mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
build: fixes
This commit is contained in:
parent
d40360c82e
commit
a13446ec59
18
build-SD.sh
18
build-SD.sh
@ -22,6 +22,8 @@ IMGBASE="NextCloudPi_$( date "+%m-%d-%y" )_base.img"
|
||||
|
||||
export NO_CONFIG=1 # skip interactive configuration
|
||||
|
||||
## BUILD
|
||||
|
||||
download_resize_raspbian_img 1G "$IMGBASE" || exit 1
|
||||
|
||||
NO_HALT_STEP=1 ./installer.sh prepare.sh "$IP" "$IMGBASE" || exit 1
|
||||
@ -32,11 +34,15 @@ NO_HALT_STEP=1 ./installer.sh prepare.sh "$IP" "$IMGBASE"
|
||||
./installer.sh raspbian-cleanup.sh "$IP" "$( ls -1t *.img | head -1 )" || exit 1
|
||||
# ./installer.sh build-devel.sh "$IP" "$( ls -1t *.img | head -1 )" || exit 1
|
||||
|
||||
## PACKING
|
||||
|
||||
IMGFILE=$( ls -1t *.img | head -1 )
|
||||
IMGNAME=$( basename "$IMGFILE" _base_prepare_lamp_nc-nextcloud_nextcloudpi_nc-init_raspbian-cleanup.img )
|
||||
|
||||
[[ "$IMGNAME" != "" ]] || exit 1
|
||||
|
||||
pack_image "$IMGFILE" "$IMGNAME.img"
|
||||
|
||||
## TESTING
|
||||
|
||||
launch_qemu "$IMGNAME.img" &
|
||||
@ -47,24 +53,14 @@ tests/tests.py "$IP" || exit 1
|
||||
|
||||
ssh_pi "$IP" sudo halt
|
||||
|
||||
## PACKING
|
||||
|
||||
pack_image "$IMGFILE" "$IMGNAME.img"
|
||||
|
||||
create_torrent "${IMGNAME}.tar.bz2"
|
||||
|
||||
## UPLOADING
|
||||
|
||||
create_torrent "${IMGNAME}.tar.bz2"
|
||||
upload_ftp "$IMGNAME"
|
||||
|
||||
## GENERATE CHANGELOG
|
||||
|
||||
generate_changelog
|
||||
|
||||
## CLEANUP
|
||||
|
||||
mkdir -p partial && mv NextCloudPi*.bz2 partial
|
||||
|
||||
rm -f *.img
|
||||
|
||||
# License
|
||||
|
||||
@ -241,7 +241,7 @@ function prepare_sshd()
|
||||
function upload_ftp()
|
||||
{
|
||||
local IMGNAME="$1"
|
||||
[[ -f "$IMGNAME" ]] || { echo "No image file found, abort"; return 1; }
|
||||
[[ -f torrent/"$IMGNAME"/"$IMGNAME".tar.bz2 ]] || { echo "No image file found, abort"; return 1; }
|
||||
[[ "$FTPPASS" == "" ]] && { echo "No FTPPASS variable found, abort"; return 1; }
|
||||
|
||||
cd torrent
|
||||
@ -255,13 +255,14 @@ put $IMGNAME.torrent
|
||||
bye
|
||||
EOF
|
||||
cd -
|
||||
cd $IMGNAME
|
||||
cd torrent/$IMGNAME
|
||||
|
||||
ftp -np ftp.ownyourbits.com <<EOF
|
||||
user root@ownyourbits.com $FTPPASS
|
||||
cd $IMGNAME
|
||||
binary
|
||||
put $IMGNAME.tar.bz2
|
||||
put md5sum
|
||||
bye
|
||||
EOF
|
||||
cd -
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user