Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Script to automate GRP's creation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Gotterdammerung
l33t
l33t


Joined: 11 Feb 2004
Posts: 627
Location: Rio de Janeiro, Brazil

PostPosted: Wed Jul 21, 2004 4:10 am    Post subject: Script to automate GRP's creation Reply with quote

I have created a script to automate GRP's creation. I believe there are things to improve this script, so I am opened to new ideas. Here it goes:

Code:

#!/bin/bash -x

WORLDFILE="~/scripts/listagem.world"
NEWPACKAGES="~/scripts/listagem.new"
PACKAGESDIR="/usr/portage/packages/All"

> ${NEWPACKAGES}

sudo emerge -ep world | awk '/ebuild/ { print $4 }' > ${WORLDFILE}

for i in `cat ${WORLDFILE}`
do
   ARQUIVO="${PACKAGESDIR}/`basename ${i}`.tbz2"

   if [ -a ${ARQUIVO} ]
   then
#      echo "${i} existe"
      echo -n "."
   else
      echo ${i} | sed "s/-[0-9].*//" >> ${NEWPACKAGES}
   fi
done

for i in `cat ${NEWPACKAGES} | sort -u`
do
   sudo emerge -B ${i}
done

> ${NEWPACKAGES}


Obs.: This topic was originally written in portuguese (https://forums.gentoo.org/viewtopic.php?t=200433), but it was given me the idea to move it here. Since I don't know how to move it, it was rewritten. Sorry. :oops:
_________________
A mind that is stretched by a new experience can never go back to its old dimensions. - Oliver Wendell Holmes
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum