Script help
Hi guys
ok i created this little installation script, which will make it easier for me to installpkgs on slackware 12.0. one of the lines in my script goes like this explodepkg packagename.gz |grep 'configure' | find -P -type f -name configure -exec configure. the output i get from this line is missing argument to 'exec'. how can i make the find command execute the configure file. even when i use ./configure i get the same result. |
Quote:
Something like explodepkg ${1} && cd "${1%.tar.gz}" && ./configure might work better. Even this isn't a good idea. It's always best to read the README and INSTALL files, and look at "./configure --help" first. There may be options that you want or need. |
can you explain to me what the explodepkg ${1} && cd "${1%.tar.gz}" && ./configure means. i dont know what all the symbols mean. thx.
|
An excellent guide on these basic shell features:
http://www.linuxcommand.org/wss0130.php http://www.linuxcommand.org/wss0150.php Also: http://tldp.org/LDP/abs/html/paramet...stitution.html Quote:
|
If you have a script, lets say, ~/bin/expl, and you include an argument of the package file, lets say abc-utils-1.1.tar.gz, then in the script, "${1}" is the first argument. It has the value of "abc-utils-1.1.tar.gz". "${1%.tar.gz}" strips of the .tar.gz extensions, leaving "abc-utils-1.1". Most packages when extracted will be contained in a directory by the same name of the package.
I don't use Slackware, so I'm not familiar with the explodepkg program and how it differs from untar'ing a package. But you can run it on its own and see what the new directory is named. It probably follows the same convention. |
All times are GMT -5. The time now is 12:50 AM. |