sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
- From: Juuso Alasuutari <iuso AT sourcemage.org>
- To: SM-Discuss <sm-discuss AT lists.ibiblio.org>
- Subject: Re: [SM-Discuss] PROVIDES clean-up
- Date: Thu, 21 Sep 2006 10:56:03 +0300
I've cured all the PROVIDES in test and z-rejected I could with a script.
I'll
post it here if anyone needs it. Below is the same info that I wrote in my
earlier post about removing BUILD_API=2 and MAINTAINER:
First of all, don't forget to change the NAME and EMAIL fields! And to make
sure everything's working it's best to first do a dry run with the "Execute
git commit" part commented out and take a look at 'git diff'. Then 'git
checkout -f' before you do the actual run. You can see the progress by
checking in 'git show', sections and spells are processes in alphabetical
order.
-------------------------------------
#!/bin/bash
# This script corrects invalid PROVIDES entries by removing preceding
# "provides" and tailing "&&" strings from each line. Each modified
# spell will be committed separately.
NAME="First Last"
EMAIL="email AT addre.ss"
# Get list of PROVIDES files.
FILES="$(find ./ -type f -name PROVIDES)"
# Go through list.
for file in $FILES; do
# Only edit PROVIDES if a corrected version of it differs from the
# original.
corrected="$(cat "$file" | sed -e "s/^\ *provides\ *//g" -e "s/\
*\&\&$//g")"
if [[ "$corrected" != "$(cat "$file")" ]]; then
# Now do the actual fixing.
sed -i "s/^\ *provides\ *//g" "$file"
sed -i "s/\ *\&\&$//g" "$file"
# Add HISTORY entry.
historyFile="${file/\/PROVIDES//HISTORY}"
sed -i "1i$(date +%Y-%m-%d) $NAME <$EMAIL>\n\t* PROVIDES: \
[automated] Fixed invalid entries.\n" "$historyFile"
# Execute git commit.
spellName="${file%%/PROVIDES}"
spellName="${spellName##*/}"
git commit -m "$spellName: [automated] Fixed invalid PROVIDES entries." -a
fi
done
-------------------------------------
--
Juuso Alasuutari
[[ Source Mage GNU/Linux ]]
Attachment:
pgpd98A1VW1q3.pgp
Description: PGP signature
-
[SM-Discuss] PROVIDES clean-up,
Juuso Alasuutari, 09/16/2006
-
Re: [SM-Discuss] PROVIDES clean-up,
Eric Sandall, 09/19/2006
-
Re: [SM-Discuss] PROVIDES clean-up,
Arwed von Merkatz, 09/19/2006
- Re: [SM-Discuss] PROVIDES clean-up, Juuso Alasuutari, 09/21/2006
- Re: [SM-Discuss] PROVIDES clean-up, Juuso Alasuutari, 09/21/2006
-
Re: [SM-Discuss] PROVIDES clean-up,
Arwed von Merkatz, 09/19/2006
-
Re: [SM-Discuss] PROVIDES clean-up,
Eric Sandall, 09/19/2006
Archive powered by MHonArc 2.6.24.