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 ...@@ -37,7 +37,7 @@ if [ "$1" = "-h" ]; then
exit 0 exit 0
fi fi
test -e "$SPEC" || fatal "use with spec" test -f "$SPEC" || SPEC=$(get_gear_spec)
$ETERBUILDBIN/rpmgs $SPEC $VER || fatal "Error with get source" $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" 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() ...@@ -65,7 +65,7 @@ get_root_git_dir()
[ -n "$DIR" ] || DIR=$(pwd) [ -n "$DIR" ] || DIR=$(pwd)
[ "$DIR" = "/" ] && return 1 [ "$DIR" = "/" ] && return 1
if [ -d "$DIR/.git" ] ; then if [ -d "$DIR/.git" ] ; then
readlink -f "$DIR" readlink -f "$DIR" 2>/dev/null || realpath "$DIR"
return return
fi fi
get_root_git_dir $(dirname "$DIR") || return 1 get_root_git_dir $(dirname "$DIR") || return 1
...@@ -156,7 +156,7 @@ do ...@@ -156,7 +156,7 @@ do
# Если файл существует, то добавляем, иначе считаем аргумент параметром. # Если файл существует, то добавляем, иначе считаем аргумент параметром.
if [ -f "$i" ]; then if [ -f "$i" ]; then
# echo is workaround for missed readlink # 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 else
set_target_type ${i/-/} || LISTARGS="$LISTARGS $i" set_target_type ${i/-/} || LISTARGS="$LISTARGS $i"
fi 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