add callables
This commit is contained in:
parent
ecee849c6e
commit
99e2c68589
6
delrepo
Executable file
6
delrepo
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
TRASH_DIR=trash
|
||||||
|
|
||||||
|
basename=$(basename $1)
|
||||||
|
mv $1 ${TRASH_DIR}/${basename}
|
10
desc
Executable file
10
desc
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$#" -eq 1 ] ; then
|
||||||
|
cat "$1/description"
|
||||||
|
elif [ "$#" -eq 2 ] ; then
|
||||||
|
echo $2 > "$1/description"
|
||||||
|
else
|
||||||
|
echo "usage: ${0} <repo path> [<description>]"
|
||||||
|
fi
|
||||||
|
|
18
help
Executable file
18
help
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if tty -s
|
||||||
|
then
|
||||||
|
echo "Run 'help' for help, or 'exit' to leave. Available commands:"
|
||||||
|
else
|
||||||
|
echo "Run 'help' for help. Available commands:"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
for cmd in *
|
||||||
|
do
|
||||||
|
case "$cmd" in
|
||||||
|
help) ;;
|
||||||
|
*) [ -f "$cmd" ] && [ -x "$cmd" ] && echo "$cmd" ;;
|
||||||
|
esac
|
||||||
|
done
|
12
list
Executable file
12
list
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
TRASH_DIR='trash'
|
||||||
|
|
||||||
|
print_if_bare_repo='
|
||||||
|
if "$(git --git-dir="$1" rev-parse --is-bare-repository)" = true
|
||||||
|
then
|
||||||
|
printf "%s\n %s\n\n" "${1#./}" "$(cat ${1}/description)"
|
||||||
|
fi
|
||||||
|
'
|
||||||
|
|
||||||
|
find -type d -name "*.git" -not -path "./${TRASH_DIR}/*" -exec sh -c "$print_if_bare_repo" -- \{} \; -prune 2>/dev/null
|
Loading…
Reference in a new issue