diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-11-21 18:11:26 +0800 |
---|---|---|
committer | Paul Barker <paul@paulbarker.me.uk> | 2014-11-24 11:41:57 +0000 |
commit | 53274f087565fd45d8452c5367997ba6a682a37a (patch) | |
tree | a2de6b19a7f7030167fc8f74934addc091d6372d | |
parent | 127b371319974b0c585969c234f85b2d5c860e34 (diff) | |
download | opkg-utils-53274f087565fd45d8452c5367997ba6a682a37a.tar.gz opkg-utils-53274f087565fd45d8452c5367997ba6a682a37a.tar.bz2 opkg-utils-53274f087565fd45d8452c5367997ba6a682a37a.zip |
update-alternatives: avoid double slash problem
The link path stored by update-alternatives should always be absolute and so we
do not need to add an additional slash when joining to $OPKG_OFFLINE_ROOT.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-rw-r--r-- | update-alternatives | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/update-alternatives b/update-alternatives index 8916cbd..ca01d5d 100644 --- a/update-alternatives +++ b/update-alternatives @@ -97,7 +97,7 @@ find_best_alt() { [ $# -lt 1 ] && return 1 [ ! -f $ad/$name ] && return 0 - link=$OPKG_OFFLINE_ROOT/`head -n 1 $ad/$name` + link=$OPKG_OFFLINE_ROOT`head -n 1 $ad/$name` prio=`sed -ne "1!p" $ad/$name | sed -e "s/\(.*\) \(.*\)/\2 \1/g" | sort -nr | head -n 1 | sed 's/ [^ ]*$//'` if [ -z "$prio" ]; then |