update
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
parent
0f94bb9711
commit
1fd7ee2219
1 changed files with 8 additions and 9 deletions
|
@ -1,8 +1,10 @@
|
|||
#!/bin/bash
|
||||
#!/bin/bash -e
|
||||
|
||||
# variables
|
||||
CWD=$(pwd)
|
||||
|
||||
VERSION=${VERSION:-$(curl -s https://api.github.com/repos/nextcloud/desktop/releases/latest | jq -r .tag_name)}
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
ARCH="AppImage"
|
||||
BUILD=1
|
||||
|
@ -15,22 +17,19 @@ OUTPUT=/tmp
|
|||
PREFIX=/usr
|
||||
|
||||
# nettoyage préalable
|
||||
rm -fr $PKG $TMP/$PRGNAM
|
||||
rm -fr $PKG
|
||||
|
||||
mkdir -p $PKG/opt/$PRGNAM
|
||||
|
||||
# mise en place
|
||||
cd $PKG/opt/$PRGNAM
|
||||
|
||||
wget -c https://download.nextcloud.com/desktop/daily/Linux/latest.AppImage -O ${PRGNAM}.AppImage
|
||||
chmod +x ${PRGNAM}.AppImage
|
||||
VERSION=$( ./${PRGNAM}.AppImage --help | grep version | sed 's/Nextcloud version //' | sed 's/ (build /_/' | tr -d \))
|
||||
wget -c https://github.com/nextcloud/desktop/releases/download/${VERSION}/Nextcloud-$(echo ${VERSION} | sed 's|^v||')-x86_64.AppImage -O ${PRGNAM}-${VERSION}.AppImage
|
||||
chmod +x ${PRGNAM}-${VERSION}.AppImage
|
||||
|
||||
mkdir -p $PKG$PREFIX/bin/
|
||||
( cd $PKG$PREFIX/bin/
|
||||
# ln -s ../../opt/$PRGNAM/${PRGNAM}.AppImage $PRGNAM
|
||||
ln -s ../../opt/$PRGNAM/${PRGNAM}.AppImage nextcloud
|
||||
)
|
||||
cd $PKG$PREFIX/bin/
|
||||
ln -s ../../opt/$PRGNAM/${PRGNAM}-${VERSION}.AppImage nextcloud
|
||||
|
||||
# correction
|
||||
cd $PKG
|
||||
|
|
Loading…
Reference in a new issue