Move google stuff to its own folder

This commit is contained in:
Christian Nieves
2022-08-15 17:06:33 +00:00
parent 8258bcc14c
commit 4cbe074ae0
11 changed files with 51 additions and 0 deletions

20
google/hgshort/hgshort.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
HGSHORT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}}")" && pwd)"
export HGSHORT_BASH_VARS="/tmp/hgshort-bash-vars-$$.sh"
export HGSHORT_BASH_ARGS="/tmp/hgshort-bash-args-$$.sh"
if [[ -f $HGSHORT_BASH_VARS ]]; then
\rm $HGSHORT_BASH_VARS # don't call rm to avoid alias loop
fi
HGSHORT_IS_HG=1 $HGSHORT_DIR/tobashargs.py "$@" > $HGSHORT_BASH_ARGS
xargs --null --arg-file=$HGSHORT_BASH_ARGS \
hg --config extensions.hgshort=$HGSHORT_DIR/hgshort.py
\rm $HGSHORT_BASH_ARGS # don't call rm to avoid alias loop
if [[ -f $HGSHORT_BASH_VARS ]]; then
source $HGSHORT_BASH_VARS
\rm $HGSHORT_BASH_VARS # don't call rm to avoid alias loop
fi