I'm using Slackware (13.37), and wrote this blog entry to help Slackware newbies like myself understand the workflow dealing with tar files downloaded from http://slackbuilds.org/.
In this example we work with installing the json-py package. The bash scripting is generalized, will work with any package install.
mkdir ~/sources
cd ~/sources
# [ in browser ] go to http://slackbuilds.org/repository/13.37/python/json-py/
# [ in browser ] to download Slackbuild json-py.tar.gz, save it to ~/sources
filename=`basename *.tar.gz .tar.gz`; tar -xf *.tar.gz; rm *.tar.gz; cd $filename;
# [ in browser ] to download Source download json-py-3_4.zip, save it to ~/sources
installpkg `./$filename.SlackBuild | grep Slackware | awk '{ print $3 }'`;
The lines of script above give a sense of the workflow. A smarter workflow is provided in the shell script below.
~/sources/eternalDownload.sh
#!/usr/bin/env bash
while true
do
echo "go to slackbuilds.org and download your SlackBuild tar.gz file, hit enter when done.";
read;
filename=`basename *.tar.gz .tar.gz`; tar -xf *.tar.gz; rm *.tar.gz;
cd $filename; pwd;
echo "go to slackbuilds.org and download your source code file, hit enter when done.";
read;
installpkg `./$filename.SlackBuild | grep Slackware | awk '{ print $3 }'`;
cd ..;
done
No comments:
Post a Comment