From: Hugo Villeneuve Date: Wed, 15 Apr 2020 14:53:45 +0000 (-0400) Subject: Add git-project-gitk.sh X-Git-Url: http://gitweb.hugovil.com/?p=hvutilities.git;a=commitdiff_plain;h=5204112b92785c2eef618b57c86d38286e4887e2 Add git-project-gitk.sh --- diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 91a359e..9379273 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -30,6 +30,7 @@ dist_bin_SCRIPTS = \ git-project-update.sh \ git-project-clone.sh \ git-project-tag.sh \ + git-project-gitk.sh \ source-code-stats \ flac2ogg flac2mp3 \ hv-scan \ diff --git a/scripts/avi2mp4 b/scripts/avi2mp4 index c9c3042..cf69f8b 100755 --- a/scripts/avi2mp4 +++ b/scripts/avi2mp4 @@ -6,7 +6,7 @@ VIDEO_OPTS="-c:v libx264 -preset veryslow -crf 15" print_usage() { - echo "${PROG_NAME} -- Conversion AVI à MP4 (x264)" + echo "${PROG_NAME} -- Conversion MP4 (x264)" echo "Usage: ${PROG_NAME} [OPTIONS...] FICHIER" echo echo "Options:" @@ -68,6 +68,8 @@ if [ ! -f $1 ]; then exit 1 fi -dest=`echo "${src}" | sed s/\.avi$/.mp4/g` +# Cut everything after the last dot using sed: +dest=`echo "${src}" | sed s/\.[^.]*$//` +dest="${dest}.mp4" ffmpeg -i "${src}" ${VIDEO_OPTS} ${audio_opts} "${dest}" diff --git a/scripts/git-project-gitk.sh b/scripts/git-project-gitk.sh new file mode 100755 index 0000000..5d698d9 --- /dev/null +++ b/scripts/git-project-gitk.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +SCRIPT="`readlink -e $0`" +SCRIPTPATH=$(dirname ${SCRIPT}) +source ${SCRIPTPATH}/hv-git-functions.sh + +print_usage() +{ + echo "$(basename $0) -- Start gitk for each subrepository" + echo "Usage: $(basename $0) [OPTIONS...]" +} + +if [ "x${1}" = "x--help" ]; then + print_usage + exit 1 +fi + +if [ ${#} -ne 0 ]; then + echo "Unsupported argument(s)" + print_usage + exit 1 +fi + +hv_git_validate_subrepos_list + +branch=${1} +rc=0 + +for r in ./ $(hv_git_get_subrepos_list); do + # Make sure directory exists + if [ ! -d "${r}" ]; then + echo "Skipping missing repos ${r}" + continue + fi + + pushd ${r} 1> /dev/null + gitk & + popd 1> /dev/null + rc=${?} +done + +exit ${rc}