2022-11-12 16:04:15 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
_target="$HOME/.local/bin"
|
2022-11-15 01:27:51 +00:00
|
|
|
mkdir -vp "$_target"
|
2022-11-18 15:27:39 +00:00
|
|
|
set +e
|
|
|
|
rm "${_target}/clone-all" 2 &>/dev/null
|
|
|
|
set -e
|
|
|
|
echo '#!/usr/bin/env bash' >>"${_target}/clone-all"
|
2022-11-15 01:27:51 +00:00
|
|
|
cd src
|
2022-11-15 04:42:40 +00:00
|
|
|
cat ./*.sh | grep -v 'usr/bin/env' >>"${_target}/clone-all"
|
2022-11-15 01:27:51 +00:00
|
|
|
chmod +x "${_target}/clone-all"
|
2022-11-12 16:04:15 +00:00
|
|
|
if ! [[ ":$PATH:" == *":$_target:"* ]]; then
|
2022-11-15 01:27:51 +00:00
|
|
|
echo "Your PATH is missing '$_target', consider adding it."
|
2022-11-12 16:04:15 +00:00
|
|
|
fi
|
2022-11-18 15:22:12 +00:00
|
|
|
cd ..
|
2022-11-18 15:27:39 +00:00
|
|
|
if ! ls -lah "${_target}/clone-all" >/dev/null; then
|
2023-01-17 08:43:16 +00:00
|
|
|
echo "installation failed somehow, clone-all should have existed at ${_target}/clone-all"
|
|
|
|
exit
|
2022-11-18 15:27:39 +00:00
|
|
|
fi
|
|
|
|
echo "clone-all installed to: ${_target}/clone-all"
|