yage
22dd6f8112
===================================================================== --- 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
32 lines
1.0 KiB
Bash
32 lines
1.0 KiB
Bash
#####################################################################
|
|
|
|
source ${0:a:h}/../global/common.zsh
|
|
source ${0:a:h}/utils/utils.module.zsh \
|
|
|| { [ $DONT_EXIT ] && return 1 || exit 1; }
|
|
|
|
#####################################################################
|
|
|
|
__GET_ENV_FILES() { ls $SCWRYPTS_CONFIG_PATH/env | sort -r }
|
|
[ ! "$(__GET_ENV_FILES)" ] && {
|
|
cp $__ENV_TEMPLATE "$SCWRYPTS_CONFIG_PATH/env/dev"
|
|
cp $__ENV_TEMPLATE "$SCWRYPTS_CONFIG_PATH/env/local"
|
|
cp $__ENV_TEMPLATE "$SCWRYPTS_CONFIG_PATH/env/prod"
|
|
}
|
|
|
|
__GET_ENV_NAMES() { __GET_ENV_FILES | sed 's/.*\///'; }
|
|
__GET_ENV_FILE() { echo "$SCWRYPTS_CONFIG_PATH/env/$1"; }
|
|
|
|
__SELECT_OR_CREATE_ENV() { __GET_ENV_NAMES | __FZF_TAIL 'select/create an environment'; }
|
|
__SELECT_ENV() { __GET_ENV_NAMES | __FZF 'select an environment'; }
|
|
|
|
#####################################################################
|
|
|
|
__GET_AVAILABLE_SCRIPTS() {
|
|
cd $SCWRYPTS_ROOT;
|
|
find . -mindepth 2 -type f -executable \
|
|
| grep -v '\.git' \
|
|
| grep -v 'node_modules' \
|
|
| sed 's/^\.\///; s/\.[^.]*$//' \
|
|
;
|
|
}
|