Permalink
Browse files

Removed dependency on dirname

  • Loading branch information...
1 parent 30df435 commit 547fe0f22e3de87224611fe414a15531404bab35 Cassiano Aquino committed Feb 25, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 redis-bash-cli
  2. +1 −1 redis-pubsub-test
View
@@ -5,7 +5,7 @@
#PS4='$(date "+%s.%N ($LINENO) + ")'
source /usr/share/redis-bash/redis-bash-lib 2> /dev/null
if [ $? -ne 0 ]; then
- LIBFOLDER=$(dirname $0)
+ LIBFOLDER=${0%/${0##*/}}
source ${LIBFOLDER}/redis-bash-lib 2> /dev/null
if [ $? -ne 0 ]; then
echo "can't find redis-bash-lib in /usr/share/redis-bash or ${LIBFOLDER}"
View
@@ -6,7 +6,7 @@
# ./redis-bash-cli -h localhost PUBLISH testchannel Hello World
source /usr/share/redis-bash/redis-bash-lib 2> /dev/null
if [ $? -ne 0 ]; then
- LIBFOLDER=$(dirname $0)
+ LIBFOLDER=${0%/${0##*/}}
source ${LIBFOLDER}/redis-bash-lib 2> /dev/null
if [ $? -ne 0 ]; then
echo "can't find redis-bash-lib in /usr/share/redis-bash or ${LIBFOLDER}"

0 comments on commit 547fe0f

Please sign in to comment.