diff --git a/functions.sh b/functions.sh index d3b09eb..3ff3cb1 100755 --- a/functions.sh +++ b/functions.sh @@ -1325,9 +1325,22 @@ pg_drop_and_recreate_db () { } scppvp () { - local SERVICE=$1 - local SETTINGS="$(ls -t $HOME/git/bmi/at.gv.bmi.common.pvp.settings/target/pvp-settings*|head -n1)" - local PVPAUTH="$(ls -t ${HOME}/git/bmi/at.gv.bmi.${SERVICE}.pvp.authenticator/target/pvp-*|head -n1)" + local SERVICE + local SVC + case $1 in + confluence|cnf) + SERVICE=confluence + SVC=cnf + ;; + jira|jra) + SERVICE=jira + SVC=jra + ;; + esac + echo SVC: $SVC + echo SERVICE: $SERVICE + local SETTINGS="$(ls -t $HOME/git/bmi/at.gv.bmi.common.pvp.settings/target/at.gv.bmi.atlassian.pvp-settings*|head -n1)" + local PVPAUTH="$(ls -t ${HOME}/git/bmi/at.gv.bmi.${SERVICE}.pvp.authenticator/target/at.gv.bmi.atlassian.pvp-authenticator*${SVC}*|head -n1)" cat << EOF deploy ${SERVICE} SETTINGS: ${SETTINGS} @@ -1354,8 +1367,7 @@ goarchive () { EOF ;; - - +([0-9]) ) + [0-9]*) ardir="$(xdg-user-dir ARCHIVE)/$(ls $(xdg-user-dir ARCHIVE) |tail -n${1:-1}|head -n1)" cat << EOF last few archives: @@ -1372,6 +1384,7 @@ EOF else [ -e "$(xdg-user-dir ARCHIVE)" ] && cd "$(xdg-user-dir ARCHIVE)" fi + shopt -u extglob } #EOF