LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Need help with mirror-slackware-current.sh (https://www.linuxquestions.org/questions/slackware-14/need-help-with-mirror-slackware-current-sh-731052/)

gmartin 06-05-2009 10:25 PM

Need help with mirror-slackware-current.sh
 
I downloaded Eric's mirror-slackware-current.sh script today and when I run this commandline, I get an error
Code:

mirror-slackware-current.sh -a x86_64 -i -l /tmp -p -o DVD -v
Error is:
Code:

[: 331: DVD: unexpected operator
Error! Invalid iso_type '-o DVD' passed as parameter!

Interesting thing is that I get this error even if I remove the -o DVD and go with the default.

I'm using this on a different machine without a problem. Any thoughts?

chess 06-05-2009 11:09 PM

Are you running the script on a non-Slackware machine by chance?

gmartin 06-05-2009 11:34 PM

Quote:

Originally Posted by chess (Post 3564874)
Are you running the script on a non-Slackware machine by chance?

Indeed, I am. I want to try to use Unetbootin to create a bootable USB from the ISO. I couldn't find a slackbuild for it, so I'm on my kubuntu laptop.

I guess that's a problem?

chess 06-05-2009 11:41 PM

Perhaps. On Slackware, /bin/sh is symlinked to bash. Eric's script uses /bin/sh in the shebang. On other systems, most notably Debian and Ubuntu, /bin/sh is symlinked to the dash shell and not bash. As such, some scripts may not work with dash.

Try entering this command to find out what /bin/sh is linked to on your system:

ls -la $(which sh).

The fix should be to simply edit the shebang in Eric's script and make it /bin/bash.

gmartin 06-06-2009 12:07 AM

Quote:

Originally Posted by chess (Post 3564887)
Perhaps. On Slackware, /bin/sh is symlinked to bash. Eric's script uses /bin/sh in the shebang. On other systems, most notably Debian and Ubuntu, /bin/sh is symlinked to the dash shell and not bash. As such, some scripts may not work with dash.

Try entering this command to find out what /bin/sh is linked to on your system:

ls -la $(which sh).

The fix should be to simply edit the shebang in Eric's script and make it /bin/bash.

Thanks for the lead. I'll fix it.


All times are GMT -5. The time now is 12:08 AM.