Created
October 25, 2013 12:39
-
-
Save Makistos/7154040 to your computer and use it in GitHub Desktop.
This script goes through .change files in the current directory and copies all the files listed to a different directory. It skips the _sources.change files as well. The obvious use is to copy the files so we can use "reprepro processincoming" to save packages to a repository.There are probably smarter ways to do this, but this is pretty portabl…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
for CHANGEFILE in *.changes; | |
do | |
str=`echo $CHANGEFILE | grep -v "source.changes"` | |
if [ -z "$str" ]; then | |
continue | |
fi | |
found="0" | |
while read line | |
do | |
if [ "$found" = "0" ] ; then | |
if [ "$line" != "Files:" ]; then | |
continue | |
else | |
found="1" | |
continue | |
fi | |
fi | |
file=`echo $line | cut -d " " -f 5` | |
cp $file $INCOMING_DIR | |
done < $CHANGEFILE | |
cp $CHANGEFILE $INCOMING_DIR | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment