Last active
August 29, 2015 14:02
-
-
Save mpkocher/e77e37866f3fa4bed611 to your computer and use it in GitHub Desktop.
Get current changelist from SEYMOUR_HOME
This file contains hidden or 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
# Add to .bashrc | |
function seamour() { | |
#source $SEYMOUR_HOME/etc/setup.sh | |
x=`env | grep SEYMOUR_HOME | awk -F "=" '{print $2}'` | |
source $x/etc/setup.sh | |
current_version=`get_current_version.sh` | |
export PS1="[${current_version}]$PS1" | |
} |
This file contains hidden or 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
#!/bin/bash | |
# add to $HOME/bin or something better | |
get_version_from_config_xml () { | |
if [ -z "$1" ] | |
then | |
echo "Unknown" | |
else | |
egrep --only-match "build=\"[0-9]*\"" $config_xml | egrep --only-match "[0-9]*" | sort | tail -1 | |
fi | |
} | |
config_xml=$SEYMOUR_HOME/etc/config.xml | |
get_version_from_config_xml $config_xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment