Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Baptiste Jonglez
committed
Jun 3, 2011
1 parent
cb4470e
commit 0d7b825
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
# | ||
# Debian builder for ASCIIpOrtal. | ||
# This script eases the build of a debian package out of ASCIIpOrtal | ||
# source code, by ssh'ing to a debian box. | ||
# I (zorun) use it because I'm not on debian right now, and building a | ||
# debian package from Arch is a pain... | ||
|
||
usage () { | ||
echo "usage: $0 <address>" | ||
echo " or $0 <user>@<address>" | ||
echo "Connects to the given host via ssh and builds a debian package." | ||
exit 1 | ||
} | ||
|
||
debsrc=asciiportal_1.3.orig.tar.gz | ||
srcdir=asciiportal-1.3-beta5-src | ||
cmdfile=/tmp/build_deb_tmp | ||
|
||
cat > "$cmdfile" <<EOF | ||
mkdir asciiportal | ||
cd asciiportal | ||
rm -rf * | ||
mv ../"$debsrc" . | ||
tar xf "$debsrc" | ||
cd "$srcdir" | ||
make | ||
EOF | ||
|
||
send () { | ||
scp "$debsrc" "$1":. | ||
} | ||
|
||
build() { | ||
ssh "$1" "$(cat $cmdfile)" | ||
} | ||
|
||
get () { | ||
echo "## TODO" | ||
} | ||
|
||
|
||
(( $# < 1 )) && usage | ||
|
||
make debian-source | ||
|
||
send "$1" | ||
build "$1" | ||
get "$1" |