Permalink
Browse files

Removed debug output and condensed canonical readlink function

  • Loading branch information...
Nicholas Robinson authored and dominictarr committed Oct 26, 2011
1 parent e37cd73 commit 31f6152a19cf75756822700bd2853ec7db33fb64
Showing with 1 addition and 14 deletions.
  1. +1 −14 bin/json_parse
View
@@ -1,20 +1,7 @@
#!/usr/bin/env bash
# Define BSD-friendly canonicalized readlink
-canonical_readlink ()
-{
- __filename=$1
- cd `dirname $__filename`
- __filename=`basename $__filename`
- if [ -h "$__filename" ]
- then
- echo $__filename
- canonical_readlink `readlink $__filename`
- else
- __dirname=`pwd -P`
- echo "$__dirname/$__filename"
- fi
-}
+canonical_readlink () { cd `dirname $1`; __filename=`basename $1`; if [ -h "$__filename" ]; then canonical_readlink `readlink $__filename`; else echo "`pwd -P`/$__filename"; fi }
#add this feature to require...
__filename=$(canonical_readlink $0)

0 comments on commit 31f6152

Please sign in to comment.