redraw_fixer: add file license header
[staging/windowmanager.git] / scripts / wm-request
index c8ab188..b9a703a 100755 (executable)
@@ -13,7 +13,19 @@ then
    exit 1
 fi
 
-for i in uuidgen afb-client-demo
+UUIDFILE=/tmp/wm-request-uuid
+if ! which uuidgen 2>/dev/null 1>&2
+then
+   echo "c7c638c5-d097-4eb4-9012-a1e4c25b9808" > $UUIDFILE
+else
+   if ! [ -f $UUIDFILE ]
+   then
+      uuidgen > $UUIDFILE
+   fi
+fi
+UUID="`cat $UUIDFILE`"
+
+for i in afb-client-demo
 do
    which $i 2>/dev/null 1>&2 || { echo "Program $i is missing" >&2; exit 1; }
 done
@@ -41,16 +53,11 @@ fi
 verb=$1
 shift
 
-UUIDFILE=/tmp/wm-request-uuid
-if ! [ -f $UUIDFILE ]
-then
-   uuidgen > $UUIDFILE
-fi
-UUID="`cat $UUIDFILE`"
-
+set +u
 args=
 if [ "$1" ]
 then
+   set -u
    args='{"drawing_name":"'"$1"'"}'
    shift
 fi