Nekochan Net

Official Chat Channel: #nekochan // irc.nekochan.net
It is currently Thu Oct 02, 2014 7:29 am

All times are UTC - 8 hours [ DST ]


Forum rules


Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
Unread postPosted: Sat May 15, 2004 5:18 pm 
Offline
User avatar

Joined: Fri Feb 21, 2003 6:29 am
Posts: 786
Location: Ypsitucky, MI
I know there's a way to automatically generate tardist prereqs but I couldn't find / rember a way to properly do it (lots of head scratching here). So, I whiped up a little script to do it for me! 'prereq_gen' takes a filename and generates a pre-formated, sorted prereq list to your home directory ready for tardists. Just cut-in-paste! Here's a sample:
Code:
prereq (
compiler_eoe.sw.lib 1279199510 maxint
compiler_eoe.sw64.lib 1279199510 maxint
dmedia_eoe.sw.base 1289570120 maxint
dmedia_eoe.sw64.lib 1289570120 maxint
eoe.sw.base 1289570120 maxint
eoe.sw64.lib 1289570120 maxint
ftn_eoe.sw64.lib 1279199510 maxint
ftn_eoe.sw64.libblas 1279199510 maxint
fw_gettext.sw.lib 1278985220 maxint
fw_glib.sw.lib 1278773620 maxint
fw_gtk+.sw.lib 1278773820 maxint
fw_xmms.sw.lib 1278774820 maxint
)


If winds up being in the least bit useful I'll add command line ops, a menu and batching. It's extensive, so it gets everything. Tardist available with release notes and docs or...




Code:
#!/bin/sh

# See '/usr/local/relnotes/prereq_gen.txt' for more info

echo ""
# Friendly welcome screen
echo "#######################################################"
echo "# Handy-Dandy prereq generator for irix 6.5 and others"
echo "# Version 0.0.0.1 alpha"
echo "#######################################################"
echo ""

# Check for the target folder, which is located in users
# home directory
if ! [ -d $HOME/generated ]
then
   mkdir -p $HOME/generated
fi

# check the tmp file(s) used for data parsing left over from
# previous generated files.  If found, dump 'em. $USER variable
# is added to avoid overlaping files

if [ -w /tmp/$USER.req_tmp -o -w /tmp/$USER.req_sorted ]
then
   rm /tmp/req_tmp 2> /dev/null ; rm /tmp/req_sorted 2> /dev/null
fi

# Read in user selected file to be generated
echo "^^^^^^^^^^^^^^^"
echo "Enter filename: "
read FILENAME

ldd $FILENAME > /dev/null 2> /dev/null
if [ $? -eq 0 ]
then
   echo "File looks good, proceding.."
else
   echo "File not executable or in binary format, bailing out.."
   exit 1
fi

# perfer cut to awk here
for x in `ldd $FILENAME | cut -d" " -f 1`
do
  versions long | grep $x | awk '{print $4}' | sort -u >> /tmp/$USER.req_tmp
done

if [ `echo $FILENAME | grep '\/'` ]
then
   FILENAME_MOD=`echo $FILENAME | sed 's/^.*\///g'`
fi
# This section needs fixing
echo "prereq (" > $HOME/generated/$FILENAME_MOD.req

for y in `cat /tmp/$USER.req_tmp`
do
   versions -n | grep $y | awk '{print $2,$3, "maxint"}' >> /tmp/$USER.req_sorted
done

# Finally, sort it all out
cat /tmp/$USER.req_sorted | sort -u >> $HOME/generated/$FILENAME_MOD.req

echo ")" >> $HOME/generated/$FILENAME_MOD.req

echo ""
echo "Prereq file generated!"
echo "Generated file name: $FILENAME_MOD.req"
echo ""

_________________
configure complete, now type 'make' and pray.


Top
 Profile  
 
 Post subject:
Unread postPosted: Mon May 17, 2004 1:27 am 
Offline
User avatar

Joined: Tue Apr 29, 2003 2:02 pm
Posts: 972
Location: Winterthur, Switzerland
autopkg ( http://www.nekochan.net/wiki/downloads/contr ... kg.tardist ) comes with a nice script for a long time already that does that for ya ;-)
But I'll be looking to your progress on this subject since I realy have no time for this stuff at the moment.

_________________
Shall I describe it to you? Or do you want me to get you a box?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: jpstewart and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group