mirror of
https://codeberg.org/gwh/slackbuilds.git
synced 2024-11-16 19:51:19 +01:00
add book about Go
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
parent
524b0ebc07
commit
0aa7a7e74f
1 changed files with 57 additions and 0 deletions
|
@ -0,0 +1,57 @@
|
|||
#!/bin/sh
|
||||
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
VERSION=$(date +"%Y.%m.%d_%H.%M")
|
||||
BUILD=1
|
||||
|
||||
ARCH=$(uname -m)
|
||||
|
||||
TAG=cyco
|
||||
TMP=/tmp/$TAG
|
||||
PKG=$TMP/pkg-$PRGNAM
|
||||
OUTPUT=/tmp
|
||||
|
||||
REPOSITORIES=/home/installs/SlackBuilds/repositories
|
||||
|
||||
PREFIX=/usr
|
||||
|
||||
# cleaning
|
||||
rm -fr $PKG
|
||||
|
||||
# get sources
|
||||
if [ ! -e $REPOSITORIES/$PRGNAM ]; then
|
||||
mkdir -p $REPOSITORIES/$PRGNAM
|
||||
( cd $REPOSITORIES/$PRGNAM
|
||||
httrack http://www.golang-book.com/ -*.dmg -*.exe +*.txt
|
||||
)
|
||||
else
|
||||
( cd $REPOSITORIES/$PRGNAM
|
||||
httrack --update
|
||||
)
|
||||
fi
|
||||
|
||||
mkdir -p $PKG$PREFIX/doc/
|
||||
cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/doc/$PRGNAM
|
||||
|
||||
( cd $PKG
|
||||
mkdir -p install
|
||||
cat <<EOF > install/slack-desc
|
||||
$PRGNAM: $PRGNAM (Go Programming book)
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM: http://www.golang-book.com/
|
||||
$PRGNAM:
|
||||
EOF
|
||||
|
||||
chown -R root:root *
|
||||
|
||||
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
||||
)
|
Loading…
Reference in a new issue