[d/factor-lang] update sources before building

This commit is contained in:
Gwenhael Le Moine 2023-08-25 13:27:23 +02:00
parent def29bfc06
commit 5dad8a25be
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -7,7 +7,7 @@ PRGNAM=$(basename $CWD)
ARCH=$(uname -m)
GITHUB_REPO=factor/factor
VERSION=${VERSION:-$(curl -s https://api.github.com/repos/${GITHUB_REPO}/releases/latest | grep tag_name | grep -o "[0-9.]*")}
BUILD=1
BUILD=${BUILD:-3}
TAG=gwh
OUTPUT=/tmp
@ -25,6 +25,8 @@ rm -fr $PKG $TMP/$PRGNAM
# mise en place
cd $TMP
[ ! -e $REPOSITORY ] && git clone https://github.com/${GITHUB_REPO}.git $REPOSITORY
cd $REPOSITORY
git pull --all
[ -e $TMP/$PRGNAM ] && rm -fr $TMP/$PRGNAM
cp -R $REPOSITORY $TMP/$PRGNAM
@ -40,12 +42,13 @@ mkdir -p $PKG$PREFIX/libexec/$PRGNAM
cp -a * $PKG$PREFIX/libexec/$PRGNAM
mkdir -p $PKG$PREFIX/{bin,doc/$PRGNAM}
cat <<EOF > $PKG$PREFIX/bin/$PRGNAM
cat <<EOF > $PKG$PREFIX/bin/factor
#!/bin/bash
cd $PREFIX/libexec/$PRGNAM
./$PRGNAM \$@
./factor \$@
EOF
chmod +x $PKG$PREFIX/bin/$PRGNAM
chmod +x $PKG$PREFIX/bin/factor
( cd $PKG$PREFIX/doc/$PRGNAM
ln -s ../libexec/$PRGNAM/readme.html
ln -s ../libexec/$PRGNAM/license.txt