From c12baac3d797cac645121ca566b8dd7326371b6f Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 14 Jan 2014 22:18:15 +0400 Subject: [PATCH] Remove absolute directory ~/lib to make it portable --- TODO | 3 --- xsetbg-dbus-change | 2 +- xsetbg-dbus-force | 2 +- xsetbg-dbus-restart | 2 +- xsetbg-dbus-start | 2 +- xsetbg-dbus-stop | 2 +- xsetbg-http-restart | 2 +- xsetbg-http-start | 2 +- xsetbg-start-http-pinger | 2 +- 9 files changed, 8 insertions(+), 11 deletions(-) diff --git a/TODO b/TODO index dc1a49f..ab4c743 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,3 @@ -Remove absolute directory ~/lib to make it portable. - - Serialized list of images for faster starting. diff --git a/xsetbg-dbus-change b/xsetbg-dbus-change index 99a4d22..0e4c197 100755 --- a/xsetbg-dbus-change +++ b/xsetbg-dbus-change @@ -1,2 +1,2 @@ #! /bin/sh -exec "$HOME/lib/xsetbg"/xsetbg-dbus-client.py change +exec "`dirname \"$0\"`"/xsetbg-dbus-client.py change diff --git a/xsetbg-dbus-force b/xsetbg-dbus-force index 52f2e2b..694b35f 100755 --- a/xsetbg-dbus-force +++ b/xsetbg-dbus-force @@ -1,2 +1,2 @@ #! /bin/sh -exec "$HOME/lib/xsetbg"/xsetbg-dbus-client.py force +exec "`dirname \"$0\"`"/xsetbg-dbus-client.py force diff --git a/xsetbg-dbus-restart b/xsetbg-dbus-restart index c10e812..512531e 100755 --- a/xsetbg-dbus-restart +++ b/xsetbg-dbus-restart @@ -1,2 +1,2 @@ #! /bin/sh -"$HOME/lib/xsetbg"/xsetbg-dbus-stop && exec "$HOME/lib/xsetbg"/xsetbg-dbus-start +"`dirname \"$0\"`"/xsetbg-dbus-stop && exec "`dirname \"$0\"`"/xsetbg-dbus-start diff --git a/xsetbg-dbus-start b/xsetbg-dbus-start index 418deb1..70fcaed 100755 --- a/xsetbg-dbus-start +++ b/xsetbg-dbus-start @@ -1,4 +1,4 @@ #! /bin/sh umask 077 -nice -20 ionice -c3 "$HOME/lib/xsetbg"/xsetbg-dbus.py >/dev/null 2>&1 & +nice -20 ionice -c3 "`dirname \"$0\"`"/xsetbg-dbus.py >/dev/null 2>&1 & diff --git a/xsetbg-dbus-stop b/xsetbg-dbus-stop index 3d2bec8..0ff6cc2 100755 --- a/xsetbg-dbus-stop +++ b/xsetbg-dbus-stop @@ -1,2 +1,2 @@ #! /bin/sh -exec "$HOME/lib/xsetbg"/xsetbg-dbus-client.py stop +exec "`dirname \"$0\"`"/xsetbg-dbus-client.py stop diff --git a/xsetbg-http-restart b/xsetbg-http-restart index 81eb21b..e6530be 100755 --- a/xsetbg-http-restart +++ b/xsetbg-http-restart @@ -1,2 +1,2 @@ #! /bin/sh -"$HOME/lib/xsetbg"/xsetbg-http-stop && exec "$HOME/lib/xsetbg"/xsetbg-http-start +"`dirname \"$0\"`"/xsetbg-http-stop && exec "`dirname \"$0\"`"/xsetbg-http-start diff --git a/xsetbg-http-start b/xsetbg-http-start index 03a6cfb..40e7a31 100755 --- a/xsetbg-http-start +++ b/xsetbg-http-start @@ -1,4 +1,4 @@ #! /bin/sh umask 077 -nice -20 ionice -c3 "$HOME/lib/xsetbg"/xsetbg-wsgi.py >/dev/null 2>&1 & +nice -20 ionice -c3 "`dirname \"$0\"`"/xsetbg-wsgi.py >/dev/null 2>&1 & diff --git a/xsetbg-start-http-pinger b/xsetbg-start-http-pinger index e897fd7..b04931a 100755 --- a/xsetbg-start-http-pinger +++ b/xsetbg-start-http-pinger @@ -1,7 +1,7 @@ #! /bin/sh # Pinger - ping xsetbg.py every minute -(cd "$HOME/lib/xsetbg" && +(cd "`dirname \"$0\"`" && while true; do sleep 60 ./xsetbg-http-change -- 2.39.5