From 5d33a4d4524b23bb2700c0dbdee3b2ab9240661d Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 6 Nov 2017 12:17:11 +0100 Subject: [PATCH] cleaning --- .../nextcloud-server.SlackBuild | 56 +++++-------------- 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/n/nextcloud-server/nextcloud-server.SlackBuild b/n/nextcloud-server/nextcloud-server.SlackBuild index deeabede..467f4384 100755 --- a/n/nextcloud-server/nextcloud-server.SlackBuild +++ b/n/nextcloud-server/nextcloud-server.SlackBuild @@ -3,7 +3,7 @@ CWD=$(pwd) PRGNAM=$(basename $CWD) -VERSION=${VERSION:-11.0.1} +VERSION=${VERSION:-12.0.3} ARCH="noarch" # hardcode ARCH BUILD=${BUILD:-1} TAG=${TAG:-cyco} @@ -25,49 +25,23 @@ rm -rf $PKG mkdir -p $TMP $OUTPUT $PKG/$VHOSTROOT case $1 in - --git) - REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM - [ ! -e $REPOSITORY ] && git clone https://github.com/nextcloud/server $REPOSITORY - ( cd $REPOSITORY - git pull - git submodule init - git submodule update ) - - VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )" - - cp -R $REPOSITORY $PKG/$VHOSTROOT/htdocs - rm -fr $PKG/$VHOSTROOT/htdocs/.git + --stable) + VERSION="stable_$(date +%F | tr - .)" + wget -c https://download.nextcloud.com/server/releases/latest.tar.bz2 -O $CWD/$PRGNAM-$VERSION.tar.bz2 + cd $PKG/$VHOSTROOT + tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 + rm $CWD/$PRGNAM-$VERSION.tar.bz2 + mv nextcloud htdocs + VERSION=$(grep VersionString htdocs/version.php | grep -o "[0-9.]*") ;; - --daily) - VERSION="daily_$(date +%F | tr - .)" - wget -c https://download.nextcloud.com/server/daily/latest-master.tar.bz2 -O $CWD/$PRGNAM-$VERSION.tar.bz2 - cd $PKG/$VHOSTROOT - tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 - rm $CWD/$PRGNAM-$VERSION.tar.bz2 - mv nextcloud htdocs - ;; - - --prerelease) - - ;; - - --stable) - VERSION="stable_$(date +%F | tr - .)" - wget -c https://download.nextcloud.com/server/releases/latest.tar.bz2 -O $CWD/$PRGNAM-$VERSION.tar.bz2 - cd $PKG/$VHOSTROOT - tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 - rm $CWD/$PRGNAM-$VERSION.tar.bz2 - mv nextcloud htdocs - ;; - *) - [ ! -e $CWD/$PRGNAM-$VERSION.tar.bz2 ] && wget -c https://download.nextcloud.com/server/releases/$PRGNAM-$VERSION.tar.bz2 -O $CWD/$PRGNAM-$VERSION.tar.bz2 - cd $PKG/$VHOSTROOT - tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 - rm $CWD/$PRGNAM-$VERSION.tar.bz2 - mv nextcloud htdocs - ;; + [ ! -e $CWD/$PRGNAM-$VERSION.tar.bz2 ] && wget -c https://download.nextcloud.com/server/releases/$PRGNAM-$VERSION.tar.bz2 -O $CWD/$PRGNAM-$VERSION.tar.bz2 + cd $PKG/$VHOSTROOT + tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 + rm $CWD/$PRGNAM-$VERSION.tar.bz2 + mv nextcloud htdocs + ;; esac cd $PKG/$VHOSTROOT/htdocs