Skip to content

Commit 8d745d0

Browse files
committed
updated Makefile for tgit
1 parent 808f38c commit 8d745d0

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ tsearch: ${CONFIG_FOLDER} ${BIN_FOLDER} tyaml
2222
install tsearch/params.yaml ${CONFIG_FOLDER}
2323
@echo "done!"
2424

25+
tgit: ${CONFIG_FOLDER} ${BIN_FOLDER}
26+
@echo "Installing tgit..."
27+
install -m 555 tgit/tgit ${BIN_FOLDER}
28+
install -m 555 tgit/dmenu_tgit ${BIN_FOLDER}
29+
install -m 555 tgit/tgit_status ${BIN_FOLDER}
30+
@echo "done!"
31+
2532
tpomodoro: ${CONFIG_FOLDER} ${BIN_FOLDER}
2633
@echo "Installing tpomodoro..."
2734
install -m 555 tpomodoro/tpomodoro ${BIN_FOLDER}
@@ -80,7 +87,7 @@ uninstall:
8087
rm -f ${BIN_FOLDER}/tprogbar
8188
@echo "done!"
8289

83-
install: tsearch ttodo tmenu tyaml tnotes tgoeswall tpomodoro tprogbar
90+
install: tsearch ttodo tmenu tyaml tnotes tgoeswall tpomodoro tprogbar tgit
8491
@echo "tinytools installed successfully!"
8592

86-
.PHONY: install tsearch tpomodoro ttodo tmenu tyaml tnotes tgoeswall uninstall tprogbar
93+
.PHONY: install tsearch tpomodoro ttodo tmenu tyaml tnotes tgoeswall uninstall tprogbar tgit

tgit/dmenu_tgit

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
#!/bin/bash
22

3-
tgit="/home/gabo/packages/tinytools/tgit/tgit"
4-
check_status="/home/gabo/packages/tinytools/tgit/check_status"
5-
repo=$(echo "$($tgit)" | dmenu -i -p Repos: | awk '{print $2}')
3+
repo=$(echo "$(tgit)" | dmenu -i -p Repos: | awk '{print $2}')
64

75
[[ -n $repo ]] || exit
86
path="$HOME/$repo"
9-
prompt=$(print "$repo" | awk -F'/' 'NF>1{print $(NF)}') && prompt="$prompt [$($check_status $path)]:"
7+
prompt=$(print "$repo" | awk -F'/' 'NF>1{print $(NF)}') && prompt="$prompt [$(tgit_status $path)]:"
108
options="open\nstatus\ndiff\ncheckout"
119
option=$(echo -e "$options" | dmenu -i -p "$prompt")
1210

tgit/tgit

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#!/bin/bash
22

3-
check_status="/home/gabo/packages/tinytools/tgit/check_status"
43
repos=''
54

65
update() {
7-
repos=$(find $HOME -name ".git" | awk -F/ 'BEGIN { OFS = FS } NF{NF-=1};1')
6+
repos=$(find $HOME -name ".git" | awk -F/ 'BEGIN { OFS = FS } NF{NF-=1};1' | grep -E -v 'vim|antigen')
87
touch /tmp/repos.dat
98
echo -e "$repos" > /tmp/repos.dat
109
}
@@ -22,7 +21,7 @@ list() {
2221
do
2322
cd $i
2423
if [[ "$(git rev-parse --git-dir)" == ".git" ]]; then
25-
status=$($check_status $i $1)
24+
status=$(tgit_status $i $1)
2625
name="${i/"$HOME/"/''}"
2726
list="$list\n[$status] $name"
2827
fi
File renamed without changes.

0 commit comments

Comments
 (0)