From 433520408e137042272ce4311ba9bd54d787ec20 Mon Sep 17 00:00:00 2001 From: gobo72 Date: Thu, 15 Sep 2011 04:07:34 +0000 Subject: [PATCH] Ajout scripts utilitaires pour VCS vd et vs --- stage2/hv-utilities/vd | 21 +++++++++++++++++++++ stage2/hv-utilities/vs | 21 +++++++++++++++++++++ stage2/install-hv-utilities | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100755 stage2/hv-utilities/vd create mode 100755 stage2/hv-utilities/vs diff --git a/stage2/hv-utilities/vd b/stage2/hv-utilities/vd new file mode 100755 index 0000000..6d7cb5a --- /dev/null +++ b/stage2/hv-utilities/vd @@ -0,0 +1,21 @@ +#!/bin/bash + +print_usage() +{ + echo "$(basename $0) -- diff for version control (svn or git) with color output." + echo "Usage: $(basename $0) [OPTIONS...]" +} + +if [ "x${1}" = "x--help" ]; then + print_usage + exit 1 +fi + +if git diff 1> /dev/null 2>&1; then + git diff "$@" +elif [ -d .svn ]; then + svn diff --diff-cmd colordiff -x "-u -w -p" "$@" | less -RFX +else + echo "Not a GIT or Subversion repository" + exit 1 +fi diff --git a/stage2/hv-utilities/vs b/stage2/hv-utilities/vs new file mode 100755 index 0000000..e34a780 --- /dev/null +++ b/stage2/hv-utilities/vs @@ -0,0 +1,21 @@ +#!/bin/bash + +print_usage() +{ + echo "$(basename $0) -- status for version control (svn or git)." + echo "Usage: $(basename $0) [OPTIONS...]" +} + +if [ "x${1}" = "x--help" ]; then + print_usage + exit 1 +fi + +if git diff 1> /dev/null 2>&1; then + git status "$@" +elif [ -d .svn ]; then + svn status "$@" +else + echo "Not a GIT or Subversion repository" + exit 1 +fi diff --git a/stage2/install-hv-utilities b/stage2/install-hv-utilities index 78608ac..bd6a3d3 100755 --- a/stage2/install-hv-utilities +++ b/stage2/install-hv-utilities @@ -10,7 +10,7 @@ BIN_UTILITIES="camera-download cd-erase cd-copy cgrep pstopdf distro-backup \ dos2unix dvd-ram-format fix-avi gztobz2 hv-backup hv-video-dvd \ mail-files mail-if-fail mail-statistics media-write pstopdf \ replace.pl rotatelogs setdate strip-debug-symbols tarbz2 \ - tildes-clean" + tildes-clean vd vs" for program in ${BIN_UTILITIES}; do install -v ${SRCDIR}/${program} ${BINDIR} -- 2.20.1