$CWD -> $REPOSITORY
This commit is contained in:
parent
e113a900b4
commit
dc84d500a5
2 changed files with 18 additions and 9 deletions
|
@ -13,6 +13,10 @@ PKG=$TMP/pkg-$PRGNAM
|
|||
OUTPUT=${OUTPUT:-/tmp}
|
||||
PREFIX=/usr
|
||||
|
||||
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM}
|
||||
|
||||
mkdir -p $REPOSITORY
|
||||
|
||||
GITEA_WORK_DIR=/var/lib/gitea
|
||||
|
||||
# Check if the gitea user and group exist. If not, then bail.
|
||||
|
@ -26,13 +30,14 @@ fi
|
|||
echo $ARCH | grep -q arm && SRC_ARCH=arm-7
|
||||
echo $ARCH | grep -q 86 && SRC_ARCH=386
|
||||
echo $ARCH | grep -q 64 && SRC_ARCH=amd64
|
||||
wget -c https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-${SRC_ARCH}.xz -O $CWD/gitea-${VERSION}-linux-${SRC_ARCH}.xz
|
||||
xz -d $CWD/gitea-${VERSION}-linux-${SRC_ARCH}.xz
|
||||
|
||||
[ ! -e $REPOSITORY/gitea-${VERSION}-linux-${SRC_ARCH}.xz ] && wget -c https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-${SRC_ARCH}.xz -O $REPOSITORY/gitea-${VERSION}-linux-${SRC_ARCH}.xz
|
||||
xz -d $REPOSITORY/gitea-${VERSION}-linux-${SRC_ARCH}.xz
|
||||
|
||||
rm -fr $PKG
|
||||
|
||||
mkdir -p $PKG$PREFIX/bin
|
||||
mv $CWD/gitea-${VERSION}-linux-${SRC_ARCH} $PKG$PREFIX/bin/${PRGNAM}
|
||||
cp $REPOSITORY/gitea-${VERSION}-linux-${SRC_ARCH} $PKG$PREFIX/bin/${PRGNAM}
|
||||
chmod +x $PKG$PREFIX/bin/${PRGNAM}
|
||||
|
||||
mkdir -p $PKG/etc/gitea/
|
||||
|
|
|
@ -21,12 +21,16 @@ PKG=$TMP/pkg-$PRGNAM
|
|||
OUTPUT=${OUTPUT:-/tmp}
|
||||
PREFIX=/usr
|
||||
|
||||
wget -c $(curl https://www.minecraft.net/en-us/download/server | grep -o "https.*server\.jar") -O $CWD/$PRGNAM.jar
|
||||
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM}
|
||||
|
||||
mkdir -p $REPOSITORY
|
||||
|
||||
[ ! -e $REPOSITORY/${PRGNAM}-${VERSION}.jar ] && wget -c $(curl https://www.minecraft.net/en-us/download/server | grep -o "https.*server\.jar") -O $REPOSITORY/${PRGNAM}-${VERSION}.jar
|
||||
|
||||
rm -fr $PKG
|
||||
|
||||
mkdir -p $PKG/opt/$PRGNAM
|
||||
mv $CWD/$PRGNAM.jar $PKG/opt/$PRGNAM/$PRGNAM.jar
|
||||
cp $REPOSITORY/${PRGNAM}-${VERSION}.jar $PKG/opt/$PRGNAM/$PRGNAM.jar
|
||||
cat <<EOF > $PKG/opt/$PRGNAM/start.sh
|
||||
#!/bin/bash
|
||||
java -Xms1G -Xmx1G -jar /opt/$PRGNAM/$PRGNAM.jar nogui
|
||||
|
|
Loading…
Reference in a new issue