mirror of
https://codeberg.org/gwh/slackbuilds.git
synced 2024-11-16 19:51:19 +01:00
add Learn C The Hard Way
This commit is contained in:
parent
a68733df92
commit
f41c283edc
1 changed files with 57 additions and 0 deletions
57
doc/learncthehardway/learncthehardway.SlackBuild
Executable file
57
doc/learncthehardway/learncthehardway.SlackBuild
Executable file
|
@ -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://c.learncodethehardway.org/book -*.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 («Learn C the Hard way» book)
|
||||
$PRGNAM:
|
||||
$PRGNAM: Zed Shaw Python learning book project, for C
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM: http://c.learncodethehardway.org/
|
||||
$PRGNAM:
|
||||
EOF
|
||||
|
||||
chown -R root:root *
|
||||
|
||||
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
||||
)
|
Loading…
Reference in a new issue