v3.3.0
===================================================================== --- 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:
@ -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 ]] \
|
||||
|
Reference in New Issue
Block a user