=====================================================================

--- Changes ------------------------------

- system/config/symlink )
   now copies the existing config from the current system if
   the "source" config does not exist (init from local)

- allowed implementation of group-custom scwrypt listing function
   GET_AVAILABLE_SCWRYPTS__<group-name>

--- Bug Fixes ----------------------------

- fixed a bug where custom runstring operators were ignored
This commit is contained in:
2023-07-20 15:11:07 -06:00
parent 620d07f1a8
commit e2c6007a65
4 changed files with 31 additions and 13 deletions

View File

@ -18,10 +18,18 @@ SETUP_SYMLINK() {
[ ! $2 ] && FAIL 1 'must provide SOURCE_CONFIG and TARGET_CONFIG'
local SOURCE_CONFIG="$1"
[ ! -f "$SOURCE_CONFIG" ] && [ ! -d "$SOURCE_CONFIG" ] && FAIL 2 "no such file or directory '$SOURCE_CONFIG'"
local TARGET_CONFIG="$HOME/.config/$2"
[ ! -f "$SOURCE_CONFIG" ] && [ ! -d "$SOURCE_CONFIG" ] && [ -f "$TARGET_CONFIG" ] && {
INFO 'SOURCE_CONFIG is not tracked; copying from TARGET_CONFIG'
mkdir -p "$(dirname "$SOURCE_CONFIG")"
cp "$TARGET_CONFIG" "$SOURCE_CONFIG"
}
[ ! -f "$SOURCE_CONFIG" ] && [ ! -d "$SOURCE_CONFIG" ] && {
WARNING "no such file or directory '$SOURCE_CONFIG'"
return 0
}
[ ! -d $(dirname "$TARGET_CONFIG") ] && mkdir -p $(dirname "$TARGET_CONFIG")
[[ $SAFE_SYMLINKS -eq 1 ]] \