From: Hugo Villeneuve Date: Thu, 24 Jan 2013 00:12:46 +0000 (-0500) Subject: Renamed vlog to vl X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=cf3e148b68f83babd7dbcc4816f3a34aefe6bc10;p=hvlinux.git Renamed vlog to vl --- diff --git a/stage2/hv-utilities/vl b/stage2/hv-utilities/vl new file mode 100755 index 0000000..8e22a64 --- /dev/null +++ b/stage2/hv-utilities/vl @@ -0,0 +1,28 @@ +#!/bin/bash + +print_usage() +{ + echo "$(basename $0) -- log for version control (svn or git)." + echo "Usage: $(basename $0) [OPTIONS...]" +} + +if [ "x${1}" = "x--help" ]; then + print_usage + exit 1 +fi + +SVN_LOG_REV_INFO_COLOR=$(echo -e '\033[1;31m') # Red +SVN_LOG_SEPARATION_COLOR=$(echo -e '\033[1;32m') # Green +NORMAL=$(echo -e '\033[0m') + +if git diff 1> /dev/null 2>&1; then + git log "$@" +elif svn diff 1> /dev/null 2>&1; then + # Colore les lignes --------- en vert + # Colore en rouge les infos de la révision + svn log "$@" | sed -e "s/^-\+$/${SVN_LOG_SEPARATION_COLOR}\0${NORMAL}/" \ + -e "s/^r[0-9]\+.\+$/${SVN_LOG_REV_INFO_COLOR}\0${NORMAL}/" | less -RFX +else + echo "Not a GIT or Subversion repository" + exit 1 +fi diff --git a/stage2/hv-utilities/vlog b/stage2/hv-utilities/vlog deleted file mode 100755 index 8e22a64..0000000 --- a/stage2/hv-utilities/vlog +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -print_usage() -{ - echo "$(basename $0) -- log for version control (svn or git)." - echo "Usage: $(basename $0) [OPTIONS...]" -} - -if [ "x${1}" = "x--help" ]; then - print_usage - exit 1 -fi - -SVN_LOG_REV_INFO_COLOR=$(echo -e '\033[1;31m') # Red -SVN_LOG_SEPARATION_COLOR=$(echo -e '\033[1;32m') # Green -NORMAL=$(echo -e '\033[0m') - -if git diff 1> /dev/null 2>&1; then - git log "$@" -elif svn diff 1> /dev/null 2>&1; then - # Colore les lignes --------- en vert - # Colore en rouge les infos de la révision - svn log "$@" | sed -e "s/^-\+$/${SVN_LOG_SEPARATION_COLOR}\0${NORMAL}/" \ - -e "s/^r[0-9]\+.\+$/${SVN_LOG_REV_INFO_COLOR}\0${NORMAL}/" | less -RFX -else - echo "Not a GIT or Subversion repository" - exit 1 -fi diff --git a/stage2/install-hv-utilities b/stage2/install-hv-utilities index 2156077..076d32d 100755 --- a/stage2/install-hv-utilities +++ b/stage2/install-hv-utilities @@ -11,7 +11,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 vd vs vlog flac2ogg flac2mp3" + tildes-clean vd vs vl flac2ogg flac2mp3" for program in ${BIN_UTILITIES}; do install -v ${SRCDIR}/${program} ${BINDIR}