xaizek / xscripts (License: Apache-2.0) (since 2020-06-28)
Small collection of some scripts I find useful.
Commit d35193acac3429fca674714da7a169e73422770f

Print worktree path in some messages
To let user know which repository is being used.
Author: xaizek
Author date (UTC): 2021-03-12 16:08
Committer name: xaizek
Committer date (UTC): 2021-03-12 16:19
Parent(s): 9edf7501cb22c6210c87fc78be270c4dfef01e25
Signing key: 99DC5E4DB05F6BE2
Tree: 0acbaa236c5468553d8eec8ca3482ded171b9166
File Lines added Lines deleted
gt-do 5 5
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
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/xscripts

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/xscripts

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master