File gt-do changed (mode: 100755) (index 7ebc92b..cae3104) |
1 |
1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
# Copyright 2020 xaizek <xaizek@posteo.net> |
|
|
2 |
|
# Copyright 2020-2021 xaizek <xaizek@posteo.net> |
3 |
3 |
# |
# |
4 |
4 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
# Licensed under the Apache License, Version 2.0 (the "License"); |
5 |
5 |
# you may not use this file except in compliance with the License. |
# you may not use this file except in compliance with the License. |
|
13 |
13 |
# See the License for the specific language governing permissions and |
# See the License for the specific language governing permissions and |
14 |
14 |
# limitations under the License. |
# limitations under the License. |
15 |
15 |
|
|
16 |
|
# This file last updated: 12 July, 2020 |
|
|
16 |
|
# This file last updated: 12 March, 2021 |
17 |
17 |
|
|
18 |
18 |
# The script dispatches repository-specific commands that are stored under |
# The script dispatches repository-specific commands that are stored under |
19 |
19 |
# `.git/actions`. |
# `.git/actions`. |
|
... |
... |
fi |
57 |
57 |
|
|
58 |
58 |
if [ $# -eq 0 ]; then |
if [ $# -eq 0 ]; then |
59 |
59 |
if [ -z "$actions" ]; then |
if [ -z "$actions" ]; then |
60 |
|
echo No actions |
|
|
60 |
|
echo "No actions in current repository ($GTDO_WORKTREE_ROOT)" |
61 |
61 |
else |
else |
62 |
|
echo "Actions of current repository:" |
|
|
62 |
|
echo "Actions of current repository ($GTDO_WORKTREE_ROOT):" |
63 |
63 |
echo "$actions" | sed 's/^/ * /' |
echo "$actions" | sed 's/^/ * /' |
64 |
64 |
fi |
fi |
65 |
65 |
exit 0 |
exit 0 |
|
... |
... |
if [ $# -eq 1 ] && ( [ "$1" = "-h" ] || [ "$1" = "--help" ] ); then |
70 |
70 |
echo "Usage: $(basename $0) -e|--edit action" |
echo "Usage: $(basename $0) -e|--edit action" |
71 |
71 |
echo "Usage: $(basename $0) action [args...]" |
echo "Usage: $(basename $0) action [args...]" |
72 |
72 |
echo |
echo |
73 |
|
echo "Actions of current repository:" |
|
|
73 |
|
echo "Actions of current repository ($GTDO_WORKTREE_ROOT):" |
74 |
74 |
echo "$actions" | sed 's/^/ * /' |
echo "$actions" | sed 's/^/ * /' |
75 |
75 |
exit 0 |
exit 0 |
76 |
76 |
fi |
fi |