Skip to content

Instantly share code, notes, and snippets.

@LordAmit
Last active April 26, 2016 04:29
Show Gist options
  • Save LordAmit/6134441 to your computer and use it in GitHub Desktop.
Save LordAmit/6134441 to your computer and use it in GitHub Desktop.
install.sh of Brightness Controller
#!/bin/sh
# Install Brightness Controller script
# Download / Save this script. Make it executable. Run it.
# It requires having wget installed, if you use another command line interface downloader, change wget to it.
wget https://github.com/lordamit/Brightness/archive/master.zip
unzip -o master.zip -d ~/.Brightness
rm master.zip
echo "[Desktop Entry]
Encoding=UTF-8
Name=Brightness Controller
Exec=$HOME/.Brightness/Brightness-master/src/brightness.py
Terminal=false
Type=Application
Icon=$HOME/.Brightness/Brightness-master/img/brightness.svg
Categories=Application;" > ~/Desktop/Brightness.desktop
chmod +x ~/Desktop/Brightness.desktop
@zlatanvasovic
Copy link

It must be

#!/bin/sh
#
# Install Brightness Controller.
# Requires `wget`, if you use another downloader, change `wget` to it.

wget https://github.com/lordamit/Brightness/archive/master.zip
unzip master.zip -d ~/.Brightness
rm master.zip
echo "[Desktop Entry]
Encoding=UTF-8
Name=Brightness Controller
Exec=$HOME/.Brightness/src/brightness.py
Terminal=false
Type=Application
Icon=$HOME/.Brightness/img/brightness.svg
Categories=Application;" > ~/Desktop/Brightness.desktop
chmod +x ~/Desktop/Brightness.desktop

💣

@LordAmit
Copy link
Author

Execute it without using terminal - and it will do nothing. It won't even replace/overwrite the existing files.
Execute it using terminal, and it will continuously ask whether it will overwrite something bla bla bla (y/n/A/c).

$ rm -rf ~/.Brightness

Is necessary.

@LordAmit
Copy link
Author

Now it is this:

#!/bin/sh
# Install Brightness Controller script
# Download / Save this script. Make it executable. Run it.
# It requires having wget installed, if you use another command line interface downloader, change wget to it.

wget https://github.com/lordamit/Brightness/archive/master.zip
unzip -o master.zip -d ~/.Brightness
rm master.zip
echo "[Desktop Entry]
Encoding=UTF-8
Name=Brightness Controller
Exec=$HOME/.Brightness/Brightness-master/src/brightness.py
Terminal=false
Type=Application
Icon=$HOME/.Brightness/Brightness-master/img/brightness.svg
Categories=Application;" > ~/Desktop/Brightness.desktop
chmod +x ~/Desktop/Brightness.desktop

@zdroid 🎱

no

$ rm

now.

@zlatanvasovic
Copy link

That's it.

@LordAmit
Copy link
Author

👍 or 👎 ?

@zlatanvasovic
Copy link

👍. You also found the path bug (Brightness-master/) and I think that all works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment