From 0aa7a7e74f42beff6c182f40eaa2bdb893e8ce36 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 4 Sep 2012 08:58:15 +0200 Subject: [PATCH] add book about Go Signed-off-by: Gwenhael Le Moine --- ...troduction-To-Programming-In-Go.SlackBuild | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100755 doc/An-Introduction-To-Programming-In-Go/An-Introduction-To-Programming-In-Go.SlackBuild diff --git a/doc/An-Introduction-To-Programming-In-Go/An-Introduction-To-Programming-In-Go.SlackBuild b/doc/An-Introduction-To-Programming-In-Go/An-Introduction-To-Programming-In-Go.SlackBuild new file mode 100755 index 00000000..f6422452 --- /dev/null +++ b/doc/An-Introduction-To-Programming-In-Go/An-Introduction-To-Programming-In-Go.SlackBuild @@ -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 < 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 +)