This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/choose-common-env

13 lines
397 B
Plaintext
Raw Normal View History

2020-11-06 00:31:43 -06:00
#!/usr/bin/env sh
2020-11-06 00:41:24 -06:00
. "$DOTFILES_PATH/bin/prelude"
2020-11-06 00:31:43 -06:00
machines_path="$DOTFILES_PATH/env/common/machines"
machine="$(
cd "$machines_path" && \
find ./ -mindepth 1 -maxdepth 1 -type d | \
cut -c3- | \
fzf --prompt "Choose your machine > ")"
2020-11-06 00:41:24 -06:00
rm -f "$ENV_PATH"
ezln "$machines_path/$machine" "$ENV_PATH" && \
echo "Symlinked '$(realpath "$machines_path/$machine")' to your ENV_PATH ('$ENV_PATH')"