diff --git a/update_mirror.sh b/update_mirror.sh index 0dae45cb6d5b5fcc765415ff8eea1fc82f73705e..6edf0887d63776ccf2f6d3377243f24c36969a8a 100755 --- a/update_mirror.sh +++ b/update_mirror.sh @@ -10,9 +10,13 @@ set -e #Include all user options and dependencies git_mirrors_dir="${0%/*}" -. "${git_mirrors_dir}/config.sh" +[ -f "${git_mirrors_dir}/config.sh" ] && . "${git_mirrors_dir}/config.sh" . "${git_mirrors_dir}/lib/VERSION" . "${git_mirrors_dir}/lib/functions.sh" +if [ ! -f "${git_mirrors_dir}/config.sh" ];then + red_echo "config.sh missing! Copy and customize from config.sh.SAMPLE. Aborting." 1>&2 + exit 1 +fi cd "${git_mirrors_dir}"