Search Results

Search: Posts Made By: madpenguin
1,382
Posted By madpenguin
Not the prettiest of things but works.... ...
Not the prettiest of things but works....


echo "main(){}" > test.c
gcc -v -march=native -o test test.c 2>cpu
ARCH=$(cat cpu | grep -o "march=.*" | sed -e 's/ .*//' -e 's/march=//')
echo $ARCH
1,382
Posted By madpenguin
autoresolving 'native' in build script
Greets. I have a build system that comprises of one parent script and about 150 children to build Gnome. I have a file that is sourced at the top of every script to gather variables needed for the...
1,883
Posted By madpenguin
Thanks Franklin. It seems to work altho from...
Thanks Franklin. It seems to work altho from reading it, I don't know why it's grabbing numerals from $BUILD instead of $VERSION.... :D I thought sed worked from first to last so my understanding...
1,883
Posted By madpenguin
Thanks for the reply but it's not quite what I...
Thanks for the reply but it's not quite what I need.


root@darkstar:~# ls /var/log/packages/glib2-2.18.1-i486-1gnome224jag
/var/log/packages/glib2-2.18.1-i486-1gnome224jag
root@darkstar:~#...
1,883
Posted By madpenguin
possible sed usage
Sorry about the title. I'm assuming I want sed anyway...

Here's the deal:

I have hundreds of files in a folder and they all are named with the same format.

$NAME-$VERSION-$ARCH-$BUILD
...
8,002
Posted By madpenguin
Hey... exit 0 does work. The error I get is...
Hey... exit 0 does work. The error I get is related to a later command in the parent but I thought it was coming from the child. You are dead right about returning the exit status.

Ughh... One...
8,002
Posted By madpenguin
I agree. Thanks for the info. I need to brush up...
I agree. Thanks for the info. I need to brush up on my trapping instead of always using exit 1 to catch errors.

I have one parent and about 150 children. If I remove the || exit 1 from the parent...
8,002
Posted By madpenguin
Thanks, that was the first thing I tried but that...
Thanks, that was the first thing I tried but that makes the parent crap out with "exit 0"...
8,002
Posted By madpenguin
exiting a child without stopping the parent
Greets all. This is using bash/sh on Slackware Linux 12....

I have a parent and MANY children scripts. The parent would be:

for script in scripts/*.sh; do
sh $script || exit 1
done

...
3,111
Posted By madpenguin
Uhh.. My previous reply is waiting on moderator...
Uhh.. My previous reply is waiting on moderator aproval for some reason but I found the problem. I was wrapping my commands in parenthesis else I wouldn't return to "pwd" for the next package in...
3,111
Posted By madpenguin
I knew about the || exit 1 bit. Thanks for...
I knew about the || exit 1 bit. Thanks for reminding me. However, it still doesn't work. I'm confounded.

http://jaguarlinux.com/pub/slackware/source/gnome-2.18.3/new/test.sh

That's my parent...
3,111
Posted By madpenguin
Sorry, forgot to mention that I do have "set -e"...
Sorry, forgot to mention that I do have "set -e" in my parent. Doesn't seem to be working. Sorry for my ignorance but could you possibly give an example of how to test the return code of a child?
...
3,111
Posted By madpenguin
Error trapping in parent/child scripts
Greets all. I'm using Slackware 12.0 with the bash shell. Calling my scripts with /bin/sh...

I'm building gnome-2.18.3 and I have all my build scripts ready and working but I'm calling them from a...
Showing results 1 to 13 of 13

 
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy