Fix common env
This commit is contained in:
parent
66c91a20bc
commit
bd570764b4
2 changed files with 4 additions and 3 deletions
|
@ -1,10 +1,12 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
. "$DOTFILES_PATH/bin/prelude"
|
||||
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 > ")"
|
||||
ezln "$machines_path/$machine" "$ENV_PATH"
|
||||
echo "Symlinked '$(realpath "$machines_path/$machine")' to your ENV_PATH ('$ENV_PATH')"
|
||||
rm -f "$ENV_PATH"
|
||||
ezln "$machines_path/$machine" "$ENV_PATH" && \
|
||||
echo "Symlinked '$(realpath "$machines_path/$machine")' to your ENV_PATH ('$ENV_PATH')"
|
||||
|
|
1
bin/ezln
1
bin/ezln
|
@ -2,5 +2,4 @@
|
|||
|
||||
SOURCE=$(realpath "$1") # this one exists
|
||||
DEST=$(realpath -m "$2") # this is the link to what exists
|
||||
|
||||
ln -s "$SOURCE" "$DEST"
|
||||
|
|
Reference in a new issue