Skip to content

Instantly share code, notes, and snippets.

@Weegee
Weegee / hl2.sh
Created June 14, 2014 13:58
Left 4 Dead 2 hl2.sh
#!/bin/bash
# figure out the absolute path to the script being run a bit
# non-obvious, the ${0%/*} pulls the path out of $0, cd's into the
# specified directory, then uses $PWD to figure out where that
# directory lives - and all this in a subshell, so we don't affect
# $PWD
GAMEROOT=$(cd "${0%/*}" && echo $PWD)