v2.6.0
===================================================================== --- New Scripts -------------------------- - i3 window manager scrypts (see --help for more info) - zsh/i3/create-local-font-override - zsh/i3/launch-or-show --- New Features ------------------------- Now support `__select` syntax in environment files! (see zsh/scwrypts/README.md for more detail) --- Changes ------------------------------ - moved some rogue configuration files under the scwrypts config - ~/.vim/bundle/build.zsh >> ~/.config/scwrypts/vundle.zsh - ~/.config/scwrypts/config.dotfile.zsh >> ~/.config/scwrypts/dotfiles.zsh - __FZF, __FZF_TAIL, and __FZF_HEAD now create prompt+response logs --- Bug Fixes ---------------------------- - zsh/config/symlinks - don't fail when trying to symlink a directory - no longer fails when trying to replace a broken symlink - scwrypts now detects environments which are symlinked - USAGE syntax now correctly shows the position of the '--' argument delimiter support __select in env files; ignore __lower_case suffix in env files; put blank line before comments in env files added i3 scripts
This commit is contained in:
		| @@ -6,8 +6,9 @@ source ${0:a:h}/../common.zsh | ||||
| 
 | ||||
| SAFE_SYMLINKS=1 | ||||
| 
 | ||||
| # in case config.dotfile.zsh is sourced... allow user to provide initial config ;) | ||||
| # in case dotfiles.zsh is sourced... allow user to provide initial config ;) | ||||
| [ ! $CONFIG__USER_SETTINGS ] \ | ||||
| 	&& CONFIG__USER_SETTINGS="$SCWRYPTS_CONFIG_PATH/config.dotfile.zsh" | ||||
| 	&& CONFIG__USER_SETTINGS="$SCWRYPTS_CONFIG_PATH/dotfiles.zsh" | ||||
| 
 | ||||
| [ ! -f "$CONFIG__USER_SETTINGS" ] && cp "$DEFAULT_CONFIG" "$CONFIG__USER_SETTINGS" | ||||
| source $CONFIG__USER_SETTINGS | ||||
|   | ||||
| @@ -15,16 +15,16 @@ SETUP_SYMLINK() { | ||||
| 	[ ! $2 ] && __FAIL 1 'must provide SOURCE_CONFIG and TARGET_CONFIG' | ||||
|  | ||||
| 	local SOURCE_CONFIG="$1" | ||||
| 	[ ! -f "$SOURCE_CONFIG" ] && __FAIL 2 "no such file '$SOURCE_CONFIG'" | ||||
| 	[ ! -f "$SOURCE_CONFIG" ] && [ ! -d "$SOURCE_CONFIG" ] && __FAIL 2 "no such file or directory '$SOURCE_CONFIG'" | ||||
|  | ||||
| 	local TARGET_CONFIG="$HOME/.config/$2" | ||||
|  | ||||
| 	[ ! -d $(dirname "$TARGET_CONFIG") ] && mkdir -p $(dirname "$TARGET_CONFIG") | ||||
|  | ||||
| 	[ -f "$TARGET_CONFIG" ] && { | ||||
| 		[[ $SAFE_SYMLINKS -eq 1 ]] && mv "$TARGET_CONFIG" "$TARGET_CONFIG.bak" | ||||
| 		[[ $SAFE_SYMLINKS -eq 0 ]] && rm "$TARGET_CONFIG" | ||||
| 	} | ||||
| 	[[ $SAFE_SYMLINKS -eq 1 ]] \ | ||||
| 		&& mv "$TARGET_CONFIG" "$TARGET_CONFIG.bak" >/dev/null 2>&1 | ||||
|  | ||||
| 	rm "$TARGET_CONFIG" >/dev/null 2>&1 | ||||
|  | ||||
| 	ln -s "$SOURCE_CONFIG" "$TARGET_CONFIG" \ | ||||
| 		&& __SUCCESS "successfully linked '$(basename $(dirname $TARGET_CONFIG))/$(basename $TARGET_CONFIG)'" \ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user