more
This commit is contained in:
parent
5d33a4d452
commit
62d88c9327
1 changed files with 9 additions and 10 deletions
|
@ -3,7 +3,7 @@
|
|||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
VERSION=${VERSION:-12.0.3}
|
||||
VERSION=${VERSION:-stable}
|
||||
ARCH="noarch" # hardcode ARCH
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-cyco}
|
||||
|
@ -24,22 +24,21 @@ set -eu
|
|||
rm -rf $PKG
|
||||
mkdir -p $TMP $OUTPUT $PKG/$VHOSTROOT
|
||||
|
||||
case $1 in
|
||||
--stable)
|
||||
VERSION="stable_$(date +%F | tr - .)"
|
||||
wget -c https://download.nextcloud.com/server/releases/latest.tar.bz2 -O $CWD/$PRGNAM-$VERSION.tar.bz2
|
||||
case $VERSION in
|
||||
"stable")
|
||||
wget -c https://download.nextcloud.com/server/releases/latest.tar.bz2 -O $CWD/latest.tar.bz2
|
||||
cd $PKG/$VHOSTROOT
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
|
||||
rm $CWD/$PRGNAM-$VERSION.tar.bz2
|
||||
tar xvf $CWD/latest.tar.bz2
|
||||
rm $CWD/latest.tar.bz2
|
||||
mv nextcloud htdocs
|
||||
VERSION=$(grep VersionString htdocs/version.php | grep -o "[0-9.]*")
|
||||
;;
|
||||
|
||||
*)
|
||||
[ ! -e $CWD/$PRGNAM-$VERSION.tar.bz2 ] && wget -c https://download.nextcloud.com/server/releases/$PRGNAM-$VERSION.tar.bz2 -O $CWD/$PRGNAM-$VERSION.tar.bz2
|
||||
[ ! -e $CWD/nextcloud-$VERSION.tar.bz2 ] && wget -c https://download.nextcloud.com/server/releases/nextcloud-$VERSION.tar.bz2 -O $CWD/nextcloud-$VERSION.tar.bz2
|
||||
cd $PKG/$VHOSTROOT
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
|
||||
rm $CWD/$PRGNAM-$VERSION.tar.bz2
|
||||
tar xvf $CWD/nextcloud-$VERSION.tar.bz2
|
||||
rm $CWD/nextcloud-$VERSION.tar.bz2
|
||||
mv nextcloud htdocs
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Reference in a new issue