Giter Club home page Giter Club logo

Comments (16)

arfoll avatar arfoll commented on July 18, 2024

we'll need more details - how about platform/OS/shell? and how you are running it?

from unrarall.

josephbisaillon avatar josephbisaillon commented on July 18, 2024

I am running a variant of archlinux off of a USB stick on a Zyxel NSA320 nas box. It's running bash 4 and I changed the top of the script to the directory location of my bash which is /ffp/bin/bash

from unrarall.

josephbisaillon avatar josephbisaillon commented on July 18, 2024

I believe version 2.6.31.8

from unrarall.

arfoll avatar arfoll commented on July 18, 2024

And have you made sure to change which shell this is being executed under in the shebang instead of - I'm guessing - busybox? Also what's the exact command you're running?

from unrarall.

arfoll avatar arfoll commented on July 18, 2024

this looks like a typical issue with a reduced shell like busybox sh

from unrarall.

josephbisaillon avatar josephbisaillon commented on July 18, 2024

Ah I'm not too familiar with linux, what should I be checking? It does seem that I have busybox on the machine though. I just checked that.

from unrarall.

arfoll avatar arfoll commented on July 18, 2024

change the first line of the script https://github.com/arfoll/unrarall/blob/master/unrarall#L1 to be #!/ffp/bin/bash

from unrarall.

josephbisaillon avatar josephbisaillon commented on July 18, 2024

ah yes I did that. and still ran into the same issue.

from unrarall.

arfoll avatar arfoll commented on July 18, 2024

How are you executing unrarall? The full command line with all parameters

from unrarall.

arfoll avatar arfoll commented on July 18, 2024

Actually interestingly bash may not technically support function names with a hyphen @delcypher you ever heard of that? (http://stackoverflow.com/questions/28114999/what-are-the-rules-for-valid-identifiers-e-g-functions-vars-etc-in-bash)

@josephbisaillon try maybe renaming clean-up to cleanup and see if that works for you

from unrarall.

josephbisaillon avatar josephbisaillon commented on July 18, 2024

I did that earlier and it ran a little more then broke at the next function with a dash. BUT you did just make me think making running it with /ffp/bin/bash unrarall --verbose --dry would work..AND it looks like it's working! I'm not sure if that would be the proper line to run. I am trying to extract files, if they are already extracted bypass and delete original rars. if not extract and THEn delete original rars.

from unrarall.

arfoll avatar arfoll commented on July 18, 2024

--dry will do nothing, we extract even if stuff is 'already extracted' because checking and making sure is rather difficult. What bash version are you using? It's weird because my nas runs arch linux and I've not seen the issue :/

from unrarall.

josephbisaillon avatar josephbisaillon commented on July 18, 2024

Bash 4.1.11(2) -release

But I wouldn't put it past my system being a little funky. I've done a lot of horrible things to this poor nas box because it was my first real linux experience haha. Thanks for all the help though it seems to be working!

from unrarall.

delcypher avatar delcypher commented on July 18, 2024

Actually interestingly bash may not technically support function names with a hyphen @delcypher you ever heard of that? (http://stackoverflow.com/questions/28114999/what-are-the-rules-for-valid-identifiers-e-g-functions-vars-etc-in-bash)

No but the docs probably aren't lying. Using - as a separator was a bad idea on my part. We should replace them with _ instead.

from unrarall.

josephbisaillon avatar josephbisaillon commented on July 18, 2024

Don't know if this will help or if you want to try to implement something like this. But this is the script that I use to extract all rar recursively in a directory. It works pretty well and ignores files that have already been extracted.

from unrarall.

josephbisaillon avatar josephbisaillon commented on July 18, 2024
# WHAT THIS DOES:
# The below script will extract each rar file into its current directory (the rars will make whatever subdirectories they need to make - which ever ones they contain of course).
# WHAT TO DO:
# 1. fill out SOURCE variable (thats where all of the rars are, well they dont necesarry have to be on the same folder level, they could be a few folders deep, but this will be the root of the operation)
# 2. pick whichever OVERWRITE option you want
# 3. copy paste the script into the shell (the parenthesis on the outsides of the script make sure it all runs nicely together)
# MORE INFO ON OVERWRITE VARIABLE:
# the overwrite variable, pick either -o+ for overwrite, -o- for not overwrite, or empty " " for prompts on overwrite. Make sure to hash out the ones you dont want. I like overwrite because then I ensure a good clean copy.
(SOURCE='/i-data/video/Downloads/DLtoNAS'
# OVERWRITE="-o+"
OVERWRITE="-o-" 
cd $SOURCE
OLDIFS=$IFS
IFS=$'\n'
for i in `find -type f | grep rar$`; do 
echo "### --------[`date +%D-%T`][`date +%s`]--------";
FILEFULLPATH=`readlink -f $i`;
FULLDIR=`dirname $FILEFULLPATH`;
echo "### EXTRACTING ${i} TO ${FULLDIR}:"
echo "### unrar x $OVERWRITE ${i} ${FULLDIR}"
unrar x $OVERWRITE "${i}" "${FULLDIR}";
done;
IFS=$OLDIFS)

from unrarall.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.