summaryrefslogtreecommitdiff
path: root/db-remove
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-17 23:47:21 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-04-17 14:46:10 -0400
commite4e5a028843316edf73cae4ac70d9df3cf8e1565 (patch)
treeb51b782a9ecc247fb00c4164a43dd1b5019918ae /db-remove
parenta2891a08c0cde48d966b037503c24b0d8f5b5f6d (diff)
Consistently use "$(dirname "$(readlink -e "$0")")"
This does correct handling of - executing a program by symlink - any weird characters in the full path - I'm sure there's another case I thought about when I originally did this.
Diffstat (limited to 'db-remove')
-rwxr-xr-xdb-remove4
1 files changed, 2 insertions, 2 deletions
diff --git a/db-remove b/db-remove
index ca56ecc..7e7fcb8 100755
--- a/db-remove
+++ b/db-remove
@@ -1,7 +1,7 @@
#!/bin/bash
-. "$(dirname "$0")/config"
-. "$(dirname "$0")/db-functions"
+. "$(dirname "$(readlink -e "$0")")/config"
+. "$(dirname "$(readlink -e "$0")")/db-functions"
if [ $# -lt 3 ]; then
msg "usage: %s <repo> <arch> <pkgname|pkgbase> ..." "${0##*/}"