#!/bin/sh -e set -x taroptions="$1" urldir="$2" urlfile="$3" dir_package="$4" dir_wanted="$5" cd /opt/steeldump/src if test -e "$dir_package"; then echo "error: $dir_package already exists, aborting" exit 1 fi if test -n "$dir_wanted" -a -e "$dir_wanted"; then echo "error: $dir_wanted already exists, aborting" exit 1 fi # --no-check-certificate because of mgr's https wget --no-check-certificate -c "$urldir$urlfile" tar x${taroptions}f "$urlfile" if test -n "$dir_wanted"; then mv "$dir_package" "$dir_wanted" fi