34 lines
748 B
Bash
Executable File
34 lines
748 B
Bash
Executable File
#!/bin/sh
|
|
|
|
echo "This script will clone Layerex's dmenu-bluetooth and copy the scripts from it that I use."
|
|
read -r -p "Are you sure you want to continue [Y/n]" input
|
|
|
|
case $input in
|
|
[nN][oO] | [nN])
|
|
echo "Okay, exiting..."
|
|
exit 0
|
|
;;
|
|
*)
|
|
printf "\n"
|
|
;;
|
|
esac
|
|
|
|
git clone https://github.com/Layerex/dmenu-bluetooth
|
|
|
|
printf "\nCopying scripts...\n"
|
|
|
|
dir="dmenu-bluetooth"
|
|
|
|
if [ -d "$dir" ]; then
|
|
for script in "$HOME"/.local/bin/*; do
|
|
if [ -f "./$dir/${script##*/}" ]; then
|
|
cp "./$dir/${script##*/}" "$HOME/.local/bin/" -v
|
|
fi
|
|
done
|
|
|
|
printf "\nRemoving %s..." "$dir"
|
|
rm -rf "./$dir" && printf "\nUpdate Complete."
|
|
else
|
|
echo "directory $dir does not exist"
|
|
fi
|