vcs-backup.sh
branchv_0
changeset 24 1d46fb79b1af
parent 23 1222714ae08f
     1.1 --- a/vcs-backup.sh	Thu Oct 24 22:04:47 2019 +0200
     1.2 +++ b/vcs-backup.sh	Thu Oct 29 19:21:19 2020 +0100
     1.3 @@ -71,7 +71,7 @@
     1.4  # Environment: all
     1.5  # $1 = VCS type: hg, git
     1.6  # $2 = URL
     1.7 -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 ]]; }
     1.8 +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 ]]; }
     1.9  
    1.10  # Environment: all
    1.11  # $1 = path to the config file