diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 9f30c15df..ce45b20ee 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,7 @@ +2003-01-24 Andrew V. Samoilov + + * extfs/urar.in: Search $PATH for unrar, fallback to rar. + 2003-01-13 Adam Byrtek * extfs/patchfs.in: context diff format support, regular diff --git a/vfs/extfs/urar.in b/vfs/extfs/urar.in index 460f7e33f..5ec61db95 100644 --- a/vfs/extfs/urar.in +++ b/vfs/extfs/urar.in @@ -6,16 +6,21 @@ # Andrew V. Samoilov 2000 # beta version 2.0 # -RAR=rar -UNRAR=unrar # Prefer unrar (freeware) -# -# NOTE: rar ver 2.0 by Eugene Roshal -# ftp.elf.stuba.sk/pub/pc/pack -# +# rar and unrar can be found on http://www.rarlabs.com/ -if ! unrar >/dev/null 2>&1; then - UNRAR=$RAR -fi +RAR=rar +UNRAR=$RAR + +# Prefer unrar (freeware). Try to find unrar in $PATH. +save_IFS="$IFS"; IFS=: +for dir in $PATH; do + IFS="$save_IFS" + test -z "$dir" && dir=. + if test -x $dir/unrar -a -f $dir/unrar; then + UNRAR=$dir/unrar + break + fi +done mcrarfs_list () {