diff options
author | Koen Kooi <koen@openembedded.org> | 2008-03-01 17:14:51 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2008-03-01 17:14:51 +0000 |
commit | 8b8053a5440337b1ba8b83b2e453bf407d9df2b2 (patch) | |
tree | d7b4d0c5239c1cf67548979ae916a066bb0177b9 /contrib/angstrom/upload-packages.sh | |
parent | 6d59cd3d9cf2f752c8afec4e11a282086ffa8395 (diff) |
angstrom contrib: add upload script from 2008 feeds
Diffstat (limited to 'contrib/angstrom/upload-packages.sh')
-rw-r--r-- | contrib/angstrom/upload-packages.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/contrib/angstrom/upload-packages.sh b/contrib/angstrom/upload-packages.sh new file mode 100644 index 0000000000..1b457a5fc9 --- /dev/null +++ b/contrib/angstrom/upload-packages.sh @@ -0,0 +1,35 @@ +#! /bin/sh +# MIT Licensed +# Initial version by Graeme 'XorA' Gregory, Further changes by Koen Kooi + +# Run this from inside ${DEPLOY_DIR} e.g. tmp/deploy/glibc/ + +# Angstrom webserver +REMOTEM=angstrom@linuxtogo.org + +# Feed dir we want to upload to +REMOTED=website/feeds/2008/ipk/$(basename $PWD) + +# create upload dir +mkdir -p upload-queue || true + +# Find and delete morgue dirs, we don't need them +find ipk/ -name "morgue" -exec rm -rf \{\} \; + +# Copy all packages to an upload queue +find ipk/ -name "*.ipk" -exec cp \{\} upload-queue/ \; + +# Find file already present on webserver +ssh $REMOTEM "find $REMOTED/ -name "*.ipk" -exec basename \{\} \;" > files-remote +ls upload-queue/ | grep -v morgue > files-local + +# Check for files already present on webserver +cat files-remote files-local | sort | uniq -u >files-uniq +cat files-uniq files-local | sort | uniq -d > files-trans + +# Copy over non-duplicate files +rsync -vz --files-from=files-trans upload-queue/ $REMOTEM:$REMOTED/unsorted/ + +# Clean up temporary files +rm -rf files-remote files-local files-uniq files-trans upload-queue + |