Small install script.
This commit is contained in:
parent
758866a3fe
commit
abeb18eee6
1 changed files with 34 additions and 0 deletions
34
install.sh
Executable file
34
install.sh
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
DIRECTORY=${HOME}/.local/share/rofi/themes/
|
||||
|
||||
if [ ! -d "${DIRECTORY}" ]
|
||||
then
|
||||
echo "Creating theme directory: ${DIRECTORY}"
|
||||
mkdir -p "${DIRECTORY}"
|
||||
fi
|
||||
|
||||
declare -i ia=0
|
||||
for themefile in **/*.rasi
|
||||
do
|
||||
if [ -f "${themefile}" ] && [ ${ia} -eq 0 ]
|
||||
then
|
||||
echo "Theme '${themefile}' exists, overwrite? y/N/a(ll)"
|
||||
read answer
|
||||
if [ x$answer = x"y" ]
|
||||
then
|
||||
echo "+Installing '${themefile}'"
|
||||
install "${themefile}" "${DIRECTORY}"
|
||||
elif [ x${answer} = x"a" ]
|
||||
then
|
||||
ia=1
|
||||
echo "+Installing '${themefile}'"
|
||||
install "${themefile}" "${DIRECTORY}"
|
||||
else
|
||||
echo "+Skipping ${themefile}"
|
||||
fi
|
||||
else
|
||||
echo "+Installing '${themefile}'"
|
||||
install "${themefile}" "${DIRECTORY}"
|
||||
fi
|
||||
done
|
Loading…
Reference in a new issue