2022-07-17 00:07:51 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-02-17 12:53:32 +01:00
|
|
|
build () {
|
|
|
|
dir="$1"
|
|
|
|
i="$2"
|
|
|
|
cd "./$dir" || exit
|
|
|
|
f=$(echo "$dir" | sed 's/\.\///')
|
|
|
|
nimble install -y
|
|
|
|
if [[ $i == "install" ]]; then
|
2023-08-29 12:26:42 +02:00
|
|
|
cp -v "$f" "$HOME/.local/bin/$f"
|
2023-02-17 12:53:32 +01:00
|
|
|
fi
|
|
|
|
cd ../
|
|
|
|
}
|
|
|
|
|
|
|
|
if [[ $2 != "" ]]; then
|
|
|
|
build "$2" "$1"
|
|
|
|
exit
|
|
|
|
fi
|
2022-07-17 00:07:51 +02:00
|
|
|
for dir in ./*; do
|
2023-02-17 12:36:43 +01:00
|
|
|
if [ -d "$dir" ]; then
|
|
|
|
if [[ "$dir" == "./" ]]; then
|
2022-07-17 21:04:49 +02:00
|
|
|
continue
|
|
|
|
fi
|
2023-02-17 12:53:32 +01:00
|
|
|
build "$dir" "$1"
|
2022-07-17 00:07:51 +02:00
|
|
|
fi
|
|
|
|
done
|