X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=scripts%2Fvs;fp=scripts%2Fvs;h=0000000000000000000000000000000000000000;hb=30c9bf42074e6b4ff0fced70041c0def07e23aa1;hp=69709adc7b93308d1044f08223b44dd1af16ec08;hpb=9c4b89cf4f92b8f02fa2d42016b553d24536030f;p=hvutilities.git diff --git a/scripts/vs b/scripts/vs deleted file mode 100755 index 69709ad..0000000 --- a/scripts/vs +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -VCS_SUPPORTED="GIT, Subversion or Mercurial" - -print_usage() -{ - echo "$(basename $0) -- status for version control (${VCS_SUPPORTED})." - echo "Usage: $(basename $0) [OPTIONS...]" - echo "Options:" - echo " -h display this help and exit" -} - -if [ "x${1}" = "x--help" ]; then - print_usage - exit 1 -fi - -SVN_ST_UNKNOWN_COLOR=$(echo -e '\033[1;34m') # Blue -SVN_ST_DELETED_COLOR=$(echo -e '\033[0;31m') # Red -SVN_ST_MISSING_COLOR=$(echo -e '\033[1;31m') # Red -SVN_ST_ADDED_COLOR=$(echo -e '\033[1;32m') # Green -SVN_ST_MODIFIED_COLOR=$(echo -e '\033[1;33m') # Yellow -NORMAL=$(echo -e '\033[0m') - -if git diff 1> /dev/null 2>&1; then - git status "$@" -elif svn diff 1> /dev/null 2>&1; then - svn status --ignore-externals "$@" | grep -v "^X" | \ - sed -e "s/^\?.*$/${SVN_ST_UNKNOWN_COLOR}\0${NORMAL}/" \ - -e "s/^!.*$/${SVN_ST_MISSING_COLOR}\0${NORMAL}/" \ - -e "s/^A.*$/${SVN_ST_ADDED_COLOR}\0${NORMAL}/" \ - -e "s/^M.*$/${SVN_ST_MODIFIED_COLOR}\0${NORMAL}/" \ - -e "s/^D.*$/${SVN_ST_DELETED_COLOR}\0${NORMAL}/" -elif hg status 1> /dev/null 2>&1; then - hg status "$@" -else - echo "Not a ${VCS_SUPPORTED} repository" - exit 1 -fi