local-bin/link.sh
2020-07-01 13:42:14 +03:00

14 lines
203 B
Bash
Executable File

#!/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