This commit is contained in:
Kenneth Reitz
2012-08-05 22:09:12 -04:00
parent b5fb89a3be
commit 75081ed1fc
13 changed files with 98 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Usage: $ build.sh <output-dir
# Usage: $ build.sh <output-dir>
SOURCE_TARBALL='http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2'
curl $SOURCE_TARBALL | tar jx
Executable
+67
View File
@@ -0,0 +1,67 @@
#!/usr/bin/env bash
# Usage: $ build.sh -f <formula> -p <prefix> [-x <archive>]
# Syntax sugar.
indent() {
RE="s/^/ /"
[ $(uname) == "Darwin" ] && sed -l "$RE" || sed -u "$RE"
}
function puts-step (){
echo "-----> $@"
}
# Argument parsing.
while getopts ":f:x:p:" opt; do
case $opt in
f)
FORMULA=$OPTARG
echo "Using formula: $FORMULA" >&2
# echo "-f was triggered, Parameter: $OPTARG" >&2
;;
p)
# echo "-p was triggered, Parameter: $OPTARG" >&2
mkdir -p $OPTARG
PREFIX_PATH=`cd "$OPTARG"; pwd`
echo "Using prefix: $PREFIX_PATH" >&2
;;
x)
ARCHIVE=$OPTARG
echo "Using archive: $OPTARG" >&2
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
esac
done
if [ ! "$FORMULA" ]; then
echo "Please specify a valid formula with -f." >&2
exit 1;
fi
if [ ! "$PREFIX_PATH" ]; then
echo "Please specify a valid prefix with -p." >&2
exit 1;
fi
echo "------> Building Formula $FORMULA"
FORMULA_PATH=$(pwd)/formula/$FORMULA
if [ ! -f $FORMULA_PATH ]; then
echo "Formula '$FORMULA' does not exist." >&2
exit 1;
fi
$(pwd)/formula/$FORMULA $PREFIX_PATH | indent
if [ "$ARCHIVE" ]; then
tar cjf $ARCHIVE $PREFIX_PATH/
fi
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Options: <output-dir>
OUT_PREFIX=$1
echo "Building SQLite..."
./parts/sqlite $OUT_PREFIX
SOURCE_TARBALL='http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2'
curl $SOURCE_TARBALL | tar jx
mv Python-2.7.3 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
View File
View File
View File
View File
View File
View File
View File
View File
View File
Executable
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Usage: $ build.sh <output-dir>
OUT_PREFIX=$1
SOURCE_TARBALL='http://www.sqlite.org/sqlite-autoconf-3070900.tar.gz'
curl -O $SOURCE_TARBALL
tar xvvf sqlite-autoconf-3070900.tar.gz
mv sqlite-autoconf-3070900 sqlite
cd sqlite
./configure --prefix=$OUT_PREFIX
make
make install