Rename 'XGrabControl' script to 'noxg'
authornorly <ny-git@enpas.org>
Fri, 10 Apr 2020 13:30:19 +0000 (15:30 +0200)
committernorly <ny-git@enpas.org>
Fri, 10 Apr 2020 13:30:19 +0000 (15:30 +0200)
This reduces confusion, as it's called 'noxg' once installed.

Makefile
XGrabControl [deleted file]
noxg [new file with mode: 0755]

index c09c2ffe46bfa17f6bc9afd3272fa64fdf8b894a..ded45be33b808ab6ffdafa3f977cda06c5430ea1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,8 +14,8 @@ $(SOFILE): $(SRCFILES) Makefile
 
 install: all
        cp $(SOFILE) $(DESTDIR)/lib/
-       cp XGrabControl $(DESTDIR)/bin/
-       ln -sf XGrabControl $(DESTDIR)/bin/noxg
+       cp noxg $(DESTDIR)/bin/
+       ln -sf noxg $(DESTDIR)/bin/noxg
 
 clean:
        rm -f $(SOFILE)
diff --git a/XGrabControl b/XGrabControl
deleted file mode 100755 (executable)
index ddc64b1..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-#
-# XGrabControl, part of XGrabControl.
-# (c) 2011, en passant development.
-#
-# This is a simple wrapper script for XGrabControl.
-# Either source it or use it:
-#   source XGrabControl
-# or use it as a program running helper:
-#   XGrabControl program arg1 arg2 ...
-
-MYNAME="XGrabControl"
-SONAME=libXGrabControl.so
-
-
-# Try to find $SONAME
-for n in $PWD "${0%/*}" /usr/lib /usr/local/lib
-do
-  if [ -e "$n/$SONAME" ]
-  then
-    SOPATH="$n/$SONAME"
-    break
-  fi
-done
-
-if [ -z "$SOPATH" ]
-then
-  echo "$MYNAME: Could not find $SONAME. Aborting."
-  exit 1
-fi
-
-
-# Insert ourselves into LD_PRELOAD if we are not there yet.
-if echo $LD_PRELOAD | grep -q "$SONAME" # $SONAME is treated as a regexp
-then
-  echo "$MYNAME: $SONAME is already in LD_PRELOAD."
-else
-  echo "$MYNAME: Adding $SOPATH to LD_PRELOAD."
-  export LD_PRELOAD="$SOPATH $LD_PRELOAD"
-fi
-
-# If any arguments were given, pass them on to the shell.
-if [ $# -gt 0 ]
-then
-  exec "$@"
-fi
diff --git a/noxg b/noxg
new file mode 100755 (executable)
index 0000000..ddc64b1
--- /dev/null
+++ b/noxg
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# XGrabControl, part of XGrabControl.
+# (c) 2011, en passant development.
+#
+# This is a simple wrapper script for XGrabControl.
+# Either source it or use it:
+#   source XGrabControl
+# or use it as a program running helper:
+#   XGrabControl program arg1 arg2 ...
+
+MYNAME="XGrabControl"
+SONAME=libXGrabControl.so
+
+
+# Try to find $SONAME
+for n in $PWD "${0%/*}" /usr/lib /usr/local/lib
+do
+  if [ -e "$n/$SONAME" ]
+  then
+    SOPATH="$n/$SONAME"
+    break
+  fi
+done
+
+if [ -z "$SOPATH" ]
+then
+  echo "$MYNAME: Could not find $SONAME. Aborting."
+  exit 1
+fi
+
+
+# Insert ourselves into LD_PRELOAD if we are not there yet.
+if echo $LD_PRELOAD | grep -q "$SONAME" # $SONAME is treated as a regexp
+then
+  echo "$MYNAME: $SONAME is already in LD_PRELOAD."
+else
+  echo "$MYNAME: Adding $SOPATH to LD_PRELOAD."
+  export LD_PRELOAD="$SOPATH $LD_PRELOAD"
+fi
+
+# If any arguments were given, pass them on to the shell.
+if [ $# -gt 0 ]
+then
+  exec "$@"
+fi