diff --git a/plugins/unpack/unrar_dir.sh b/plugins/unpack/unrar_dir.sh index 7c5108120..4538bc721 100755 --- a/plugins/unpack/unrar_dir.sh +++ b/plugins/unpack/unrar_dir.sh @@ -24,41 +24,14 @@ process_directory() return $ret } -process_directory_rp() -{ - "$1" -x "$2." "$3" - last=$? - [ $last -ge 1 ] && [ $last -ne 10 ] && ret=$last - for fn in "$2"* ; do - if [ -d "${fn}" ] && [ ! -L "${fn}" ] ; then - name=$(basename "${fn}") - process_directory "$1" "${fn}/" "$3${name}/" - last=$? - [ $last -ge 1 ] && [ $last -ne 10 ] && ret=$last - fi - done - return $ret -} - -if [ "$(uname -a)" = "*raspberrypi*" ] ; then - if [ "$6" != '' ] ; then - process_directory_rp "$1" "$2" "$6" - ret=$? - else - process_directory_rp "$1" "$2" "$3" - ret=$? - fi +if [ "$6" != '' ] ; then + process_directory "$1" "$2" "$6" + ret=$? else - if [ "$6" != '' ] ; then - process_directory "$1" "$2" "$6" - ret=$? - else - process_directory "$1" "$2" "$3" - ret=$? - fi + process_directory "$1" "$2" "$3" + ret=$? fi - if [ $ret -eq 0 ] && [ "$5" != '' ] ; then OIFS=$IFS IFS=';' diff --git a/plugins/unpack/unrar_file.sh b/plugins/unpack/unrar_file.sh index 01528e0ba..e3a8f4568 100755 --- a/plugins/unpack/unrar_file.sh +++ b/plugins/unpack/unrar_file.sh @@ -6,22 +6,12 @@ # $5 - archive files to delete # $6 - unpack temp dir -if [ "$(uname -a)" = "*raspberrypi*" ] ; then - if [ "$6" != '' ] ; then - "$1" -x "$2" "$6" - ret=$? - else - "$1" -x "$2" "$3" - ret=$? - fi +if [ "$6" != '' ] ; then + "$1" x -ai -c- -kb -o+ -p- -y -v -- "$2" "$6" + ret=$? else - if [ "$6" != '' ] ; then - "$1" x -ai -c- -kb -o+ -p- -y -v -- "$2" "$6" - ret=$? - else - "$1" x -ai -c- -kb -o+ -p- -y -v -- "$2" "$3" - ret=$? - fi + "$1" x -ai -c- -kb -o+ -p- -y -v -- "$2" "$3" + ret=$? fi if [ $ret -eq 0 ] && [ "$5" != '' ] ; then