Displaying 1 result from an estimated 1 matches for "test_symlink_cmd".
2002 Apr 08
0
portable tests for symlinks (was patch for autoconf manual)
...test for links.
    ln -s foo "$scratchdir/testlink"
    for cmd in test /bin/test /usr/bin/test /usr/ucb/bin/test /usr/ucb/test
    do
        for switch in -h -L
        do
            if $cmd $switch "$scratchdir/testlink" 2>/dev/null
    	then
    	    # how nice
    	    TEST_SYMLINK_CMD="$cmd $switch"
    	    # i wonder if break 2 is portable?
    	    break 2
    	fi
       done
    done
    # ok, now get rid of it
    rm "$scratchdir/testlink"
    
    
    if [ "x$TEST_SYMLINK_CMD" = 'x' ]
    then
        test_fail "Couldn't dete...