Create the config directory so that tee can create the files.
This commit is contained in:
13
setup.sh
13
setup.sh
@@ -9,9 +9,10 @@ LOCAL=$DIR/local.yml
|
|||||||
URL="https://git.hyperling.com/me/env-ansible"
|
URL="https://git.hyperling.com/me/env-ansible"
|
||||||
BRANCH="main"
|
BRANCH="main"
|
||||||
|
|
||||||
general_config="/usr/local/etc/hyperling-scm/general.ini"
|
config_dir="/usr/local/etc/hyperling-scm"
|
||||||
workstation_config="/usr/local/etc/hyperling-scm/workstation.ini"
|
general_config="$config_dir/general.ini"
|
||||||
server_config="/usr/local/etc/hyperling-scm/server.ini"
|
workstation_config="$config_dir/workstation.ini"
|
||||||
|
server_config="$config_dir/server.ini"
|
||||||
|
|
||||||
## Functions ##
|
## Functions ##
|
||||||
|
|
||||||
@@ -129,6 +130,12 @@ echo "Installed!"
|
|||||||
#echo "Added!"
|
#echo "Added!"
|
||||||
|
|
||||||
# Create basic layouts if configs do not exist and are requested.
|
# Create basic layouts if configs do not exist and are requested.
|
||||||
|
if [[ -n "$create_general"
|
||||||
|
|| -n "$create_workstation"
|
||||||
|
|| -n "$create_server" ]]
|
||||||
|
then
|
||||||
|
sudo mkdir -pv "$config_dir"
|
||||||
|
fi
|
||||||
if [[ -n "$create_general" && ! -f "$general_config" ]]; then
|
if [[ -n "$create_general" && ! -f "$general_config" ]]; then
|
||||||
function print_general_contents {
|
function print_general_contents {
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user