diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pro-archman.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pro-archman.sh b/src/pro-archman.sh index 38e7941..8d07481 100644 --- a/src/pro-archman.sh +++ b/src/pro-archman.sh @@ -131,6 +131,8 @@ get_options() get_conf() { + local old_dir= + # Set defaults. conf_incoming_channel='dev' conf_incoming_dir='../incoming' @@ -140,8 +142,12 @@ get_conf() . "${opt_base_dir}/conf" fi - conf_incoming_dir="$(cd "${opt_base_dir}" && \ - cd "${conf_incoming_dir}" && pwd)" + old_dir="$(pwd)" + cd "${opt_base_dir}" + if [ -d "${conf_incoming_dir}" ]; then + conf_incoming_dir="$(cd "${conf_incoming_dir}" && pwd)" + fi + cd "${old_dir}" return 0 } |