Skip to content

Instantly share code, notes, and snippets.

@sgk
Last active December 14, 2015 04:48
Show Gist options
  • Save sgk/5030301 to your computer and use it in GitHub Desktop.
Save sgk/5030301 to your computer and use it in GitHub Desktop.
Build and install GIT 1.8.1.4 on the very old Solaris 9.
#!/usr/bin/env bash
SOURCE=git-1.8.1.4.tar.gz
SOURCEDIR=git-1.8.1.4
BASH=/usr/bin/bash
MAKE=/usr/local/bin/make
PERL=/usr/local/bin/perl
PYTHON=/usr/local/bin/python
LIBDIR=/usr/local/lib
#############
MAKE="$MAKE NO_GETTEXT=yes"
unpack()
{
tar xvzf $SOURCE
}
config()
{
LDFLAGS="-L$LIBDIR -R$LIBDIR" ./configure --disable-pthreads --with-perl=$PERL --with-python=$PYTHON --with-shell=$BASH
}
build()
{
$MAKE
}
install()
{
BEFORE=$(mktemp)
AFTER=$(mktemp)
trap "rm -f $BEFORE $AFTER" 0 1 2 15
find /usr/local -print | sort > $BEFORE
sudo -k
echo '%' sudo $MAKE NO_GETTEXT=yes install
sudo $MAKE install
find /usr/local -print | sort > $AFTER
diff -u $BEFORE $AFTER | grep '^+' | grep -v '^+++' | sed -e 's/^+//' >> ../installed.txt
}
#############
if [ ! -d "$SOURCEDIR" ]; then
unpack
fi
cd $SOURCEDIR
config && build && install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment