make the script work from any directory

This commit is contained in:
Cole Deck
2020-02-20 09:52:58 -06:00
parent cabd98c252
commit 56b0525ef4
2 changed files with 474 additions and 0 deletions

1
tlp.sh
View File

@ -1,6 +1,7 @@
#!/bin/bash
printf "Choose a profile:\n1. High Performance\n2. Best Battery\n\nPick a number: "
read -e -n 1 choice
cd "${0%/*}"
if [ "$choice" = "1" ]; then
sudo mv /etc/tlp.conf tlp_old.conf
sudo cp battery_ok.conf /etc/tlp.conf