Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
#!/bin/sh # script from Jamin W. Collins BTS: #255165 # use ~/bin/ubuntu.sh create/build hardy/jaunty somefile.dsc # Mahyuddin Susanto (2009) udienz@unej.ac.id OPERATION=$1 DISTRIBUTION=$2 PROCEED=false BASE_DIR="$HOME/pbuilder" RESULT="$BASE_DIR/result/$DISTRIBUTION/`date +%d%m%y`" if [ ! -d "$BASE_DIR" ] || [ ! -d "$RESULT" ] || [ ! -d $BASE_DIR/apt-cache/$DISTRIBUTION/ ] ; then sudo mkdir -p "$BASE_DIR" "$RESULT" "$BASE_DIR/apt-cache/$DISTRIBUTION/" fi sudo mkdir -p $BASE_DIR/$DISTRIBUIOTN/result/`date +%d%m%y` case $OPERATION in create|update|build|clean|login|execute ) PROCEED=true ;; esac if ( $PROCEED == true ) then shift sudo pbuilder $OPERATION \ --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \ --distribution $DISTRIBUTION --aptcache "$BASE_DIR/apt-cache/$DISTRIBUTION/" \ --mirror "http://mirror.unej.ac.id/ubuntu" --components "main restricted universe multiverse" \ --othermirror "deb http://mirror.unej.ac.id/ubuntu/ $DISTRIBUTION-updates main restricted universe multiverse | deb http://mirror.unej.ac.id/ubuntu/ $DISTRIBUTION-security main restricted universe | deb http://mirror.unej.ac.id/ubuntu/ $DISTRIBUTION-backports main restricted universe multiverse" \ --buildresult $RESULT "$@" else echo "Invalid command..." echo "Valid commands are:" echo " create" echo " update" echo " build" echo " clean" echo " login" echo " execute" exit 1 fi
This paste will be private.
From the Design Piracy series on my blog: