From 6a7273907bb2663c62ccfe52da43ee9609e2aacc Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 23 May 2017 14:21:26 -0500 Subject: [PATCH] move example to proper location (and install it) --- .../goldilocks/goldilocks.example.yml | 0 install.sh | 6 ++++++ 2 files changed, 6 insertions(+) rename goldilocks.example.yml => etc/goldilocks/goldilocks.example.yml (100%) diff --git a/goldilocks.example.yml b/etc/goldilocks/goldilocks.example.yml similarity index 100% rename from goldilocks.example.yml rename to etc/goldilocks/goldilocks.example.yml diff --git a/install.sh b/install.sh index eb055e2..9568d44 100644 --- a/install.sh +++ b/install.sh @@ -72,6 +72,7 @@ my_app_dir=$(mktemp -d) installer_base="https://git.daplie.com/Daplie/goldilocks.js/raw/master" my_app_etc_config="etc/${my_app_name}/${my_app_name}.yml" +my_app_etc_example_config="etc/${my_app_name}/${my_app_name}.example.yml" my_app_systemd_service="etc/systemd/system/${my_app_name}.service" my_app_systemd_tmpfiles="etc/tmpfiles.d/${my_app_name}.conf" my_app_launchd_service="Library/LaunchDaemons/${my_app_pkg_name}.plist" @@ -122,6 +123,11 @@ install_for_launchd() install_etc_config() { + $sudo_cmd mkdir -p $(dirname "$MY_ROOT/$my_app_etc_example_config") + mkdir -p $(dirname "$my_app_dir/$my_app_etc_example_config") + dap_dl "$installer_base/$my_app_etc_example_config" "$my_app_dir/$my_app_etc_example_config" + $sudo_cmd mv "$my_app_dir/$my_app_etc_example_config" "$MY_ROOT/$my_app_etc_example_config" + if [ ! -e "$MY_ROOT/$my_app_etc_config" ]; then $sudo_cmd mkdir -p $(dirname "$MY_ROOT/$my_app_etc_config") mkdir -p $(dirname "$my_app_dir/$my_app_etc_config")