dotfiles/bashscripts/gitls
2023-02-18 20:26:28 +01:00

23 lines
366 B
Bash
Executable file

#!/bin/sh
# https://github.com/mzavoloka/gitls
dirs=${@:-$PWD}
gitls_script=$(realpath "${0}-cwd");
cd $PWD
bold=$(tput bold)
reset=$(tput sgr0)
for dir in $dirs
do
echo "$bold$dir:$reset"
if [ ! -e $dir ]; then
echo "$dir doesn't exist"
elif [ -d $dir ]; then
( cd $dir && bash $gitls_script )
else
echo "$dir is not a directory"
fi
done