]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/functions
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 11 Mar 2019 05:29:03 +0000 (05:29 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 11 Mar 2019 05:29:03 +0000 (05:29 +0000)
etc/profile.d/functions

index ec5fdca61a3b13574116aeaee50ab3562dab4ef8..82c05f4933d8d9785e336bc271e83e282e820584 100755 (executable)
@@ -22,11 +22,12 @@ which timeout > /dev/null || timeout() {
 }
 
 which realpath > /dev/null || realpath() {
+       perl -MFile::Spec -MCwd -e 'print File::Spec->rel2abs( Cwd::abs_path($ARGV[0]) )."\n" if -e $ARGV[0]' "$1"
+       return
        case "$OSTYPE" in
                darwin*) [ -h "$1" ] && readlink "$1" || echo "$1";;
                *) readlink -f "$1" ;;
        esac
-       # perl -MFile::Spec -MCwd -e 'print File::Spec->rel2abs( Cwd::abs_path($ARGV[0]) )."\n" if -e $ARGV[0]' "$1"
 }
 
 # NB 11.03.19 which realpath > /dev/null || realpath() {