Skip to content

Instantly share code, notes, and snippets.

@tehprofessor
Last active December 19, 2015 19:09
Show Gist options
  • Save tehprofessor/6003880 to your computer and use it in GitHub Desktop.
Save tehprofessor/6003880 to your computer and use it in GitHub Desktop.
Git-Changelog Installer (only tested on Debian 7.0 and Mac OS X 10.8)
#!/bin/bash
unamestr=`uname`
platform_path='unknown'
if [[ "$unamestr" == "Linux" ]]; then
platform_path='/usr/bin'
if [[ $UID != 0 ]]; then
echo "Please run this script with sudo:"
echo "sudo $0 $*"
exit 1
fi
elif [[ "$unamestr" == "Darwin" ]]; then
platform_path='/usr/local/bin'
fi
# Get Script
echo "Installing git-changelog to $platform_path"
`curl 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/gitlog-to-changelog' >> $platform_path/git-changelog`
`chmod ug+rx $platform_path/git-changelog`
`chmod o+x $platform_path/git-changelog`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment