local-bin/link.sh

14 lines
203 B
Bash
Raw Normal View History

2020-07-01 13:42:14 +03:00
#!/bin/sh
files=($(ls $PWD/bin))
dest="$HOME/.local/bin"
# Ensure destination exists
if [ ! -d "$dest" ]; then
mkdir -p "$dest"
fi
for file in "${files[@]}"; do
ln -sf "$PWD/bin/$file" "$dest"
done