You are not logged in.
I have several folders copied over into my build dir. Now instead of going into each folder and building each package separately, I'd like to automate this in one command...
I can do this... but it seems like it could be done differently. Just an example:
bld="~/home/builds"
cd $bld
cd gcc && makepkg -s && cd ../firefox && makepkg -s && cd ../conky && makepkg -s && cd ../openbox && makepkg -sWould there be an easier way...?
Not looking to run makepkg in parallel, just one after the other.
Offline
Use a for loop.
Offline
Use a for loop.
Would something like this work..?
for i in $(cat $log1)
do
makepkg -s $i
doneContents of my grep in $log1
/home/builds/gcc/PKGBUILD
/home/builds/firefox/PKGBUILD
/home/builds/conky/PKGBUILD
/home/builds/openbox/PKGBUILD
/home/builds/rsync/PKGBUILDSomewhat new to this ...
Offline
cd /home/builds/
for pkg in gcc firefox conky openbox rsync; do
cd $pkg
makepkg -si
cd ..
doneor even
cd /home/builds/
for in in *; do
...Offline
cd /home/builds/
for in in *; do
...Thanks for the reply, could you explain this to me .... I understand your other example
And how does the loop break after all packages have been installed?
Last edited by StanIsTheMan (2009-10-06 08:36:12)
Offline
This is the same as above Stan, does a loop as above, Except it assumes that ALL package directories in /home/builds will want to be built.
http://steve-parker.org/sh/loops.shtml
Last edited by Gen2ly (2009-10-06 16:57:48)
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
This is the same as above Stan, does a loop as above, Except it assumes that ALL package directories in /home/builds will want to be built.
Thx... Its just been awhile since I had been writing any scripts ....
So, as you can see, for simply loops through whatever input it is given, until it runs out of input.
Last edited by StanIsTheMan (2009-10-06 21:53:48)
Offline