1
0
Fork 0
Scripts/install-scripts.sh

13 lines
430 B
Bash
Raw Permalink Normal View History

2022-10-01 16:29:32 +02:00
#!/bin/bash
# Install scripts from this repo using our neighbour paf.sh.
# Requires fdfind and fzf to work.
2022-10-01 16:54:39 +02:00
our_dir="$( cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
paf="$our_dir/paf.sh"
scripts_dir="$1"
[[ -z "$scripts_dir" ]] && scripts_dir="$our_dir"
2022-10-01 16:29:32 +02:00
2022-10-01 16:54:39 +02:00
fdfind -t x . "$scripts_dir" \
| fzf --multi --layout=reverse --header="Pick scripts to install" \
2022-10-01 16:29:32 +02:00
| while read -r script; do "$paf" "$script"; done