From 83f68ffbbf6b834985c3dbe6298ffa8a6564167a Mon Sep 17 00:00:00 2001 From: Graham Helton Date: Sun, 16 Oct 2022 15:39:45 -0400 Subject: [PATCH] Fixed bugs --- autodeploy.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/autodeploy.sh b/autodeploy.sh index 19aeae0..52fd0c2 100755 --- a/autodeploy.sh +++ b/autodeploy.sh @@ -147,7 +147,7 @@ collect_files(){ # Copies all files listed in $HOST_CONFIG_PATH/autodeploy_files.conf recursively, verbosely, and forcefully to the staging area. Filters out un-needed lines, and logs them to $hostname_files.log cp -rvf --parents $line $HOST_CONFIG_PATH 2> /dev/null | grep "^'" | awk '{print $1}' | sed "s/'//g" | sed 's@'"$HOME"'@$HOME@' 2>/dev/null # Going to need to add sorting somewhere in here because this log will keep growing - echo -e $TICK_MOVE$GREEN" Copying $BLUE$line$GREEN to $BLUE$HOST_CONFIG_PATH if file exists"$ENDCOLOR + echo -e $TICK_MOVE$GREEN" Copying $BLUE$line$GREEN to $BLUE$HOST_CONFIG_PATH$GREEN if file exists"$ENDCOLOR done < $CONFIG_PATH/autodeploy_files.conf | grep -v "^#" cd $CONFIG_PATH @@ -268,10 +268,14 @@ main(){ fi # Process command line arugments - while getopts "d n m c p s f a b l :e:" o; do + while getopts "h d n m c p s f a b l :e:" o; do case "${o}" in + h) + h=${OPTARG} + usage + ;; l) - c=${OPTARG} + l=${OPTARG} echo -e $TICK$GREEN$TITLE"Listing available configuration files"$ENDCOLOR list_configs ;;