1170 |
# creates md5sums for smages to given dir |
# creates md5sums for smages to given dir |
1171 |
if [[ $1 = calcmd5 ]] |
if [[ $1 = calcmd5 ]] |
1172 |
then |
then |
1173 |
if [ $# -ge 3 ] |
if [ $# -ge 2 ] |
1174 |
then |
then |
1175 |
SMAGENAME="$2" |
SMAGENAME="$2" |
1176 |
MD5DIR="$3" |
MD5DIR="$3" |
1177 |
|
[[ -z ${MD5DIR} ]] && MD5DIR="$(dirname ${SMAGENAME})/md5" |
1178 |
|
|
1179 |
source ${SMAGENAME} || die "download source failed" |
source ${SMAGENAME} || die "download source failed" |
1180 |
|
|
1181 |
# overridable sourcedir; must be declared after source of the smage2 |
# overridable sourcedir; must be declared after source of the smage2 |
1228 |
echo |
echo |
1229 |
else |
else |
1230 |
echo "Usage: Calculating MD5 Sums:" |
echo "Usage: Calculating MD5 Sums:" |
1231 |
echo " $(basename $0) calcmd5 /path/to/SMAGENAME /path/to/MD5DIR" |
echo " $(basename $0) calcmd5 /path/to/SMAGENAME [/path/to/MD5DIR]" |
1232 |
echo |
echo |
1233 |
echo |
echo |
1234 |
echo "Export the CALC_SOURCEDIR variable to override current SOURCEDIRs." |
echo "Export the CALC_SOURCEDIR variable to override current SOURCEDIRs." |