vcs-backup.sh
branchv_0
changeset 10 5454e8a0c53e
parent 9 66728b983b41
child 11 d46ed3f5c72b
     1.1 --- a/vcs-backup.sh	Sat Apr 20 22:17:38 2019 +0200
     1.2 +++ b/vcs-backup.sh	Sat Apr 20 22:24:24 2019 +0200
     1.3 @@ -78,13 +78,14 @@
     1.4  # $1 = VCS type: hg, git
     1.5  # $2 = URL
     1.6  # $3 = "public" or "private" (default), whether the repository should be available through the public web interface
     1.7 +# $4 = "clone" (optional), if present, will also clone the backup locally
     1.8  vcs_backup_public_clientSubmitBackupRequest() {
     1.9  	if isValidTypeAndURL "$1" "$2"; then
    1.10  		loadConfigFile ~/.config/vcs-backup/client.cfg
    1.11  		${VCS_BACKUP_SSH_COMMAND[@]} vcs-backup.sh serverSubmitBackupRequest "$1" "$2" "$3" "$4"
    1.12  		if [[ "$4" == "clone" ]]; then
    1.13 -			if   [[ "$1" == "hg"  ]]; then  hg clone "ssh://${VCS_BACKUP_SERVER}//mnt/data/current/$1/$(urlToRelativeDirectoryPath $2)";
    1.14 -			elif [[ "$1" == "git" ]]; then git clone "ssh://${VCS_BACKUP_SERVER}//mnt/data/current/$1/$(urlToRelativeDirectoryPath $2)";
    1.15 +			if   [[ "$1" == "hg"  ]]; then  hg clone "ssh://${VCS_BACKUP_SERVER}/$VCS_BACKUP_CURRENT_DIR/$1/$(urlToRelativeDirectoryPath $2)";
    1.16 +			elif [[ "$1" == "git" ]]; then git clone "ssh://${VCS_BACKUP_SERVER}/$VCS_BACKUP_CURRENT_DIR/$1/$(urlToRelativeDirectoryPath $2)";
    1.17  			fi
    1.18  		fi
    1.19  	else