ssokolow / quicktile

Adds window-tiling hotkeys to any X11 desktop. (An analogue to WinSplit Revolution for people who don't want to use Compiz Grid)
https://ssokolow.com/quicktile/
GNU General Public License v2.0
869 stars 78 forks source link

install.sh fails if not executed from parentdir #84

Closed Baerbeisser closed 7 years ago

Baerbeisser commented 7 years ago

For example, like this i get: sudo ./.quicktile/install.sh * Running setup.py install python2: can't open file 'setup.py': [Errno 2] No such file or directory

My solution would be adding cd $(dirname $0) at the top of install.sh

ssokolow commented 7 years ago

Huh. Looks like I missed a project when I was retrofitting that. One of these days, I'll have to try to cook up some kind of lint to ensure all my projects meet base standards.

Speaking of which, you don't need to use sudo. If you run it unprivileged, it'll run setup.py build without elevated privileges and then re-run itself with sudo for you.

Also, I generally use cd "$(dirname "$(readlink -f "$0")")" since it's a good idea to be in the habit of resolving symlinks and handling whitespace properly.