X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tools%2Fnd_updatedist;h=39d345ecaba8e72b863048c7edf3e804fe54604a;hb=HEAD;hp=432f9bc47eb08e5ab49066f5175db7964ca014f7;hpb=9a229a41d66ff3d986a2f79fcf3056a38ac031bb;p=neurodebian.git diff --git a/tools/nd_updatedist b/tools/nd_updatedist index 432f9bc..39d345e 100755 --- a/tools/nd_updatedist +++ b/tools/nd_updatedist @@ -1,6 +1,26 @@ #!/bin/bash -. /home/neurodebian/neurodebian.git/tools/nd_cmdsettings.sh +if [ $# -eq 1 ]; then + family=${1%%-*} + dist=${1##*-} +elif [ $# -ge 2 ]; then + family=$1 + dist=$2 +fi + +set -e + +if [ -z "$family" ]; then + echo "you need to provide a distribution family ('debian', 'ubuntu'); prefix with 'nd+' to enable the neurodebian repository." + exit 1 +fi + +if [ -z "$dist" ]; then + echo "you need to provide a distribution codename (e.g. 'lenny', 'squeeze')." + exit 1 +fi + +. /etc/neurodebian/cmdsettings.sh "$family" "$dist" # common options opts="--distribution $dist --aptcache $aptcache --buildplace $buildplace"