#! /bin/bash - # Implementing update functionality for an PSA. ############################################################################### # # UPDATE PSA # Usage: # update_psa [ --? ] # [ --help ] # [ --wdir "working_directory" ] # [ --file "config_file" ] # [ --dbg ] # [ --version ] # # ./update_psa --file $PWD/update_psa.conf --wdir $PWD # ############################################################################### # if [ $# -eq 0 ]; then # no parameters given -> nothing to do # exit 0 #fi if [ -z $IFS ]; then IFS=$'\n' fi # parse commandline parameters while test $# -gt 0; do case $1 in --file | --fil | --fi | --f | -file | -fil | -fi | -f ) shift CONFIGFILENAME="$1" ;; --zone | --zon | --zo | --z | -zone | -zon | -zo | -z ) shift ZONE="$1" ;; --wdir | --wdi | --wd | --w | -wdir | -wdi | -wd | -w ) shift WORKING_DIRECTORY="$1" ;; --help | -hel | --he | --h | '--?' | -help | -hel | -he | -h | '-?' ) usage_and_exit 0 ;; --version | --versio | --versi | --vers | --ver | --ve | --v | \ -version | -versio | -versi | -vers | -ver | -ve | -v ) version exit 0 ;; --dbg | --db | --d | -dbg | -db | -d ) set_dbg_level $DEBUG ;; -*) error "Unrecognized option: $1" ;; *) break ;; esac shift done if cd "$WORKING_DIRECTORY"; then source ./update_psa_impl if read_config then check_default_route check_route_to_repository "185.191.219.134" # git.mimbach.de check_for_running_apism if clone_customer_repository ${CUSTOMER_REPOSITORY_PATH} then check_sanity_of_repository #set_updates_available #while : #do # sleep 5 # updates_available && break #done update_psa "testing" #update_psa fi fi exit 0 fi exit -1 ###############################################################################