Skip to content

Instantly share code, notes, and snippets.

@Jesse-V
Created August 28, 2015 03:44
Show Gist options
  • Save Jesse-V/ba851ce990106aa1338d to your computer and use it in GitHub Desktop.
Save Jesse-V/ba851ce990106aa1338d to your computer and use it in GitHub Desktop.
#/bin/bash
# tor-onions-common MUST be built first before the others
# push for Trusty to see if it builds
./OnioNS_BuildOne.sh tor-onions-common OnioNS-common trusty
./OnioNS_BuildOne.sh tor-onions-server OnioNS-server trusty
./OnioNS_BuildOne.sh tor-onions-client OnioNS-client trusty
./OnioNS_BuildOne.sh tor-onions-hs OnioNS-HS trusty
# push for other versions of Ubuntu
for arch in vivid wily
do
./OnioNS_BuildOne.sh tor-onions-common OnioNS-common $arch
./OnioNS_BuildOne.sh tor-onions-server OnioNS-server $arch
./OnioNS_BuildOne.sh tor-onions-client OnioNS-client $arch
./OnioNS_BuildOne.sh tor-onions-hs OnioNS-HS $arch
echo "Done pushing for $arch"
done
echo "Done pushing packages. Check email for Launchpad build reports."
#!/bin/sh
arch=$3
oldVersion=$(grep -m 1 -o '(.*)' $2/debian/changelog | cut -c 2- | rev | cut -c 2- | rev)
version=$(echo $oldVersion | sed "s/trusty/$arch/g")
package=$1_$version #major.minor.patch.build
#clean builds
cd $2/
rm -rf build
cd ../
cd $2/
tar -czf ${package}.orig.tar.gz src/ #http://xkcd.com/1168/
cd ../
echo "Tarball creation step complete."
#http://www.cyberciti.biz/faq/linux-unix-creating-a-manpage/
cp -rl $2/debian $2/src/debian # this cannot be a symlink
sed -i "s/trusty/$arch/g" $2/src/debian/changelog
#if [ -f $2/debian/extra_includes/manpage ]
#then
# gzip --best -c $2/debian/extra_includes/manpage > $2/src/debian/extra_includes/onions.1.gz
#fi
# https://github.com/linuxmint/nemo/issues/108#issuecomment-54789165
cd $2/src/
dpkg-buildpackage -S -sa -kAD97364FC20BEC80 # to upload to Launchpad
#dpkg-buildpackage -rfakeroot -us -uc # to build myself
cd ../
echo "Debian packaging step complete."
dput ppa:jvictors/testing ${package}_source.changes # -l # enable to upload
rm -rf src/debian/
rm -f ${package}.orig.tar.gz ${package}.debian.tar.gz
rm -f ${package}.dsc ${package}.dsc ${package}_source.changes
rm -f ${package}_source.ppa.upload
rm -f debian/extra_includes/tor*
#rm $2/debian/extra_includes/onions.1.gz
echo "Cleanup complete."
echo ""
echo "Github release commands:"
echo "git tag -s -u AD97364FC20BEC80 v"$version" -m 'Release "$version"'"
echo "git push origin --tags"
echo "Packages @ https://launchpad.net/~jvictors/+archive/ubuntu/tor-dev/+packages"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment