-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add functions to process-files, add apps-home
These new process-files functions will likely find their way into go-script-bash as well.
- Loading branch information
Showing
5 changed files
with
112 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! /usr/bin/env bash | ||
# | ||
# Utilities to manage the APPS_HOME directory structure | ||
# | ||
# Exports: | ||
# create_apps_home | ||
# Creates the APPS_HOME directory structure | ||
|
||
. "$_GO_USE_MODULES" 'log' 'process-files' | ||
|
||
export APPS_HOME_DIRS=( | ||
"$APPS_HOME/etc/profile.d" | ||
) | ||
export APPS_HOME_DIR_PERMISSIONS="${APPS_HOME_DIR_PERMISSIONS:-755}" | ||
export APPS_HOME_FILE_PERMISSIONS="${APPS_HOME_FILE_PERMISSIONS:-644}" | ||
|
||
if [[ -z "$APPS_HOME" ]]; then | ||
@go.log FATAL "APPS_HOME not defined; set it in settings.bash" | ||
fi | ||
|
||
# Creates the APPS_HOME directory structure | ||
create_apps_home() { | ||
local dir | ||
|
||
for dir in "${APPS_HOME_DIRS[@]}"; do | ||
create_dirs_with_permissions "$dir" "$APPS_HOME_DIR_PERMISSIONS" | ||
done | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters