All pastes #230783 Raw Edit

gapz

public shellscript v1 · immutable
#230783 ·published 2006-10-31 12:55 UTC
rendered paste body
#!/bin/sh# Arguments: 'init' or 'stable'ORIG_DIR=`pwd`BASE_URL="http://gauvain.tuxfamily.org/school/2006-10-31/textcat"if [ "$1" ]; then    if [ -d textcat/debian ]; then        rm -rf textcat/debian/*;    fi    mkdir -p $ORIG_DIR/textcat/debian;    cd $ORIG_DIR/textcat;       if [ ! -f $ORIG_DIR/textcat/libtextcat_2.2.orig.tar.gz ]; then        wget  $BASE_URL/libtextcat_2.2.orig.tar.gz;    fi    cd debian;        case "$1" in        stable )            for i in changelog control createfp.8 docs libtextcat-bin.install rules compat copyright createfp.install libtextcat0.install libtextcat-dev.install; do                wget $BASE_URL/debian-$1/$i            done;;        init )            for i in changelog compat control copyright createfp.8 docs rules; do                wget $BASE_URL/debian-$1/$i            done;;        * )            echo "                Usage: ./get_files.sh ["stable" or "init"]                ";;    esac    chmod a+x rules;    cd $ORIG_DIR;else echo "    Usage: ./get_files.sh ["stable" or "init"]            "fi