Skip to content

Commit

Permalink
Revert "Add support for raspberrypi unrar"
Browse files Browse the repository at this point in the history
This reverts commit c78a3c3.
  • Loading branch information
stickz committed Jan 2, 2023
1 parent f98d500 commit 83d9ab4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 47 deletions.
37 changes: 5 additions & 32 deletions plugins/unpack/unrar_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=';'
Expand Down
20 changes: 5 additions & 15 deletions plugins/unpack/unrar_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 83d9ab4

Please sign in to comment.