THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
#!/bin/sh
#create the destination directory
echo "Creating working dir $VERSION"
mkdir $VERSION
cd $VERSION
# get the distro
echo "Getting distro $VERSION"
wget -erobots=off -nv -l 1 --accept=zip,md5,sha1,asc -r --no-check-certificate -nd -nH https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/$VERSION
# rename files
echo "Renaming files"
for f in *2-assembly*.zip*
do
mv $f `echo $f | sed s/2-assembly//g`
done
# remove unneeded files
echo "Removing unneeded files"
for f in struts2-assembly-*.pom*
do
rm $f
done
# remove unneeded hashes
echo "Removing unneeded files"
rm *.asc.md5
rm *.asc.sha1
cd ..
# checking in new version
echo "Pushing test version $VERSION"
svn --no-auth-cache co --depth empty https://dist.apache.org/repos/dist/dev/struts/ struts-dev
mv $VERSION struts-dev/
cd struts-dev
svn add --force ./
svn --no-auth-cache commit -m "Updates test release $VERSION"
cd ..
# cleaning up
rm -r struts-dev
echo "Done!" |
...