# HG changeset patch # User František Kučera # Date 1603995679 -3600 # Node ID 1d46fb79b1af6d8c492e10e9a809e67a57db0b61 # Parent 1222714ae08fb41c584dfdc4842a3a183f39f3c5 allow the ~ character in the URL diff -r 1222714ae08f -r 1d46fb79b1af vcs-backup.sh --- a/vcs-backup.sh Thu Oct 24 22:04:47 2019 +0200 +++ b/vcs-backup.sh Thu Oct 29 19:21:19 2020 +0100 @@ -71,7 +71,7 @@ # Environment: all # $1 = VCS type: hg, git # $2 = URL -isValidTypeAndURL() { ([[ "$1" == "hg" || "$1" == "git" ]]) && [[ $(echo "$2" | wc -l) == 1 ]] && [[ $(echo "$2" | grep -E '^(http|https|ssh)://([a-zA-Z0-9_-][a-zA-Z0-9_-.]*/?)+$' | wc -l) == 1 ]]; } +isValidTypeAndURL() { ([[ "$1" == "hg" || "$1" == "git" ]]) && [[ $(echo "$2" | wc -l) == 1 ]] && [[ $(echo "$2" | grep -E '^(http|https|ssh)://([a-zA-Z0-9_-][a-zA-Z0-9_-.~]*/?)+$' | wc -l) == 1 ]]; } # Environment: all # $1 = path to the config file