Commit 36bbd05d authored by Vitaly Lipatov's avatar Vitaly Lipatov

use realpath if not readlink, fix readlink workaround with echo

parent ab10e8a8
......@@ -37,7 +37,7 @@ if [ "$1" = "-h" ]; then
exit 0
fi
test -e "$SPEC" || fatal "use with spec"
test -f "$SPEC" || SPEC=$(get_gear_spec)
$ETERBUILDBIN/rpmgs $SPEC $VER || fatal "Error with get source"
add_changelog_helper "- new version $(get_version $SPEC) (with rpmrb script)" $SPEC || echog "Changelog entry already exists"
......
......@@ -65,7 +65,7 @@ get_root_git_dir()
[ -n "$DIR" ] || DIR=$(pwd)
[ "$DIR" = "/" ] && return 1
if [ -d "$DIR/.git" ] ; then
readlink -f "$DIR"
readlink -f "$DIR" 2>/dev/null || realpath "$DIR"
return
fi
get_root_git_dir $(dirname "$DIR") || return 1
......@@ -156,7 +156,7 @@ do
# Если файл существует, то добавляем, иначе считаем аргумент параметром.
if [ -f "$i" ]; then
# echo is workaround for missed readlink
LISTNAMES="$LISTNAMES $(readlink -f $i 2>/dev/null | echo $i)"
LISTNAMES="$LISTNAMES $(readlink -f "$i" 2>/dev/null || realpath "$i" || echo "$i")"
else
set_target_type ${i/-/} || LISTARGS="$LISTARGS $i"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment