mirror of
https://github.com/horst3180/arc-theme.git
synced 2024-10-27 19:04:02 +00:00
Adding a question to install the script
This commit is contained in:
parent
3d548a1fd4
commit
83f98f4448
@ -91,6 +91,24 @@ install_theme() {
|
|||||||
./autogen.sh --prefix=/usr
|
./autogen.sh --prefix=/usr
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
# Install this script
|
||||||
|
if [ ! -f /usr/bin/$(basename $0) ]; then
|
||||||
|
echo
|
||||||
|
read -r -p "Do you like to install the $(basename $0) for future upgrades? [y/N] " response
|
||||||
|
case $response in
|
||||||
|
[yY][eE][sS]|[yY])
|
||||||
|
cp -r arc-theme-upgrade /usr/bin/
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Aborted by user"
|
||||||
|
exit 0;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "Upgrading the $(basename $0)"
|
||||||
|
cp -f $(basename $0) /usr/bin/
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove the sources
|
# Remove the sources
|
||||||
rm -rf $tempdir
|
rm -rf $tempdir
|
||||||
|
|
||||||
@ -124,4 +142,4 @@ case $response in
|
|||||||
echo "Aborted by user"
|
echo "Aborted by user"
|
||||||
exit 0;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user