Update 2024-12-26 14:23 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id
2024-12-26 14:23:38 +01:00
parent 7eb3f826fb
commit e9581ec17d
5 changed files with 243 additions and 22 deletions

View File

@@ -122,12 +122,38 @@ fi
if [ "$_action" == "diff" ]
then
if test -z "$1" || test -z "$2"
then
echo "args: <file> <env>"
exit 1
fi
set -x
f="$(readlink -f $_oldpwd/$1)"
f="${f#$_dir}"
vimdiff "$_dir/$f" "${_dir%$_env}$2/$f"
fi
if [ "$_action" == "diffdir" ]
then
if test -z "$1" || test -z "$2"
then
echo "args: <commits> <env>"
exit 1
fi
flist="$(git --no-pager whatchanged \
--oneline \
--pretty=format:'' ...HEAD~$1 \
| cut -d"M" -f2- \
| sort -u \
| xargs)"
for file in $flist
do
f="$(readlink -f $_oldpwd/$file)"
f="${file#$_dir}"
vimdiff "$_dir/$f" "${_dir%$_env}$2/$f"
done
fi
if [ "$_action" == "pr" ]
then
if [ -n "$1" ]