Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplify usage of $GSC_PID.

  • Loading branch information...
commit 7c4daf24b19fb389a73c6d2ccaa5b315d30ae19f 1 parent d3fa38b
Christoph Mallon authored Yamagi committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 stuff/quake2-start.sh
View
8 stuff/quake2-start.sh
@@ -1,14 +1,14 @@
#!/bin/sh
# PID of "gnome-screensaver-command -i" (if used)
-GSC_PID=0
+GSC_PID=""
# if gnome-screensaver is running in the background..
if [ $(ps auxww | grep gnome-screensaver | wc -l) -gt 0 ]; then
echo "inhibiting gnome screensaver"
gnome-screensaver-command -i &
# save the PID of the last command
- GSC_PID=$!
+ GSC_PID="$!"
fi
# Stop unclutter
@@ -24,9 +24,9 @@ ulimit -c unlimited
./quake2 $*
# if gnome-screensaver was running..
-if [ $GSC_PID -gt 0 ]; then
+if [ -n "$GSC_PID" ]; then
echo "reactivating gnome screensaver"
- kill $GSC_PID
+ kill "$GSC_PID"
fi
# Continue unclutter
Please sign in to comment.
Something went wrong with that request. Please try again.