Comments (8)
Hi,
I'm afraid I don't have a machine with OSX on to test unrarall. You are probably right when you say the problem is bash differences. I don't think you are invoking it correctly though.
$ sh unrarall -c -v
Will probably break because I believe /bin/sh is not proper bash. It might be bash emulating simplier "sh" behaviour. If you're running a bash shell you should invoke as
$ /path/to/script/unrallall -c -v
or to explicitly run it do
$ /bin/bash /path/to/script/unrarall -c -v
If that does not fix problems please tell us your bash version
$ /bin/bash --version
and in the script change the first line to
#!/bin/bash -x
Now when you run the script you will see every command executed. It's a little like debugging output. That will help us/you determine what's going wrong.
from unrarall.
I'm having the same problem and running bash version 3.2.48(1)-release (x86_64-apple-darwin12).
As I'm a beginner when it comes bash scripting, I was able to fix it but – I think – not in the right way.
The problem is the string 7z is being interpreted as a number. I changed it to sevenzip and replaced "7z" from all the script.
After that I had another problem regarding the "declare" statement.
-A is not a recognized option but -a (not capitalized) is.
Maybe that helps you guys...
from unrarall.
@leods92 . The use of "-A" rather than "-a" is deliberate. It is for associative arrays (as opposed to indexed arrays) which was introduced in Bash 4 I think.
@leods92 @peol I've created a new branch "old-bash-fix" ( https://github.com/arfoll/unrarall/tree/old-bash-fix ) that has some fixes in it that avoids the use associative arrays. Please try it. If it fixes your issues I'll merge the changes into master.
Thanks for trying out unrarall!
from unrarall.
Hi, sorry for the late response. I'll try it out and let you know :)
Thanks for taking the time to solve this!
from unrarall.
@delcypher The fixes in old-bash-fix
seems to do the trick, worked like a charm. Thanks again for taking the time and fix this.
from unrarall.
@delcypher I've also tried and it worked perfectly.
I didn't know Apple was shipping such an old version of bash.
A little bit off-topic: do you know the reason for that? I mean, updating it would break many system features or they just don't care?
And thank YOU for letting us use unrarall as well as maintaining and supporting it.
from unrarall.
@leods92 bash4 moved to GPLv3 whilst bash3 is GPLv2. A lot of embedded vendors also dislike shipping bash4 because of this. I'd recommend keeping /bin/sh to use bash3 to make sure you don't break anything but then move to bash4 for /bin/bash. That way nothing should break and you can make sure scripts such as these use bash4 by using #!/bin/bash
@delcypher I'm really not bothered about bash3 compat, then again since we have OSX users maybe these should be merged...
from unrarall.
The changes have been merged (with a few tweaks) into master
and the version has been bumped to 0.3
from unrarall.
Related Issues (20)
- unrarall cleans files if subs rar has extracted cleanly HOT 6
- FR: Move subtitle files to main dir HOT 2
- Mac sed, the special snowflake... HOT 3
- Clobbering files on extraction and skipping already extracted files HOT 1
- extraction fails if source folder name has spaces HOT 5
- wishlist HOT 1
- provide example usage in readme.md HOT 2
- [BASH 3] Relative path gives error message about UNRARALL_OUTPUT_DIR not being a directory HOT 4
- Egrep style regular expressions break finding rar files in certain cases. HOT 1
- Valid rar file invalid mime type HOT 2
- .r00 files not found HOT 1
- Does not obey --skip-if-exists. HOT 2
- Feature request: Option to rename output file to parent directory HOT 1
- Allow 7zip to extract .ISO Files
- Only 1 working HOT 1
- Extracting files into a path named after the file
- Get error at unrar
- Unnrar from subfolders and rename extracted file to parent folder name HOT 1
- .zip support HOT 1
- line 45 - grep HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unrarall.