From 65117e4ce3a4da56772b9610b8da382f8d30393a Mon Sep 17 00:00:00 2001 From: Jan Houben Date: Tue, 29 Aug 2017 00:24:36 +0200 Subject: [PATCH] Allow custom repo name Needed for testing the ci using a different repo name --- conf.sh | 3 +-- push.sh | 2 +- repo.sh | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/conf.sh b/conf.sh index 031df4c..660c19d 100644 --- a/conf.sh +++ b/conf.sh @@ -16,9 +16,8 @@ zfs_initcpio_hook_hash="3eb874cf2cbb6c6a0e1c11a98af54f682d6225667af944b43435aeab email="jeezusjr@gmail.com" # Repository path and name -repo_name="archzfs" +repo_basename="archzfs" repo_basepath="/repo" -repo_name_test="archzfs-testing" # SSH login address (can use ssh config Hosts) remote_login="webfaction" diff --git a/push.sh b/push.sh index 6df5b0c..fd4f2c0 100755 --- a/push.sh +++ b/push.sh @@ -131,7 +131,7 @@ push_repo() { elif [[ ${push_repo} -ne 1 ]]; then return fi - run_cmd "rsync -vrtlh --delete-before ${repo_basepath}/${repo_name} ${package_backup_dir} webfaction:/home/jalvarez/webapps/default/ ${dry}" + run_cmd "rsync -vrtlh --delete-before ${repo_basepath}/${repo_basename} ${package_backup_dir} webfaction:/home/jalvarez/webapps/default/ ${dry}" run_cmd_check 1 "Could not push packages to webfaction!" } diff --git a/repo.sh b/repo.sh index 3e7f4ca..3201f57 100755 --- a/repo.sh +++ b/repo.sh @@ -73,9 +73,9 @@ fi for (( a = 0; a < $#; a++ )); do if [[ ${args[$a]} == "azfs" ]]; then - repo_name="archzfs" + repo_name=${repo_basename} elif [[ ${args[$a]} == "test" ]]; then - repo_name="archzfs-testing" + repo_name="${repo_basename}-testing" elif [[ ${args[$a]} =~ repo=(.*) ]]; then repo_name=${BASH_REMATCH[1]} elif [[ ${args[$a]} == "ccm" ]]; then