Skip to content

Commit

Permalink
updated Makefile for tgit
Browse files Browse the repository at this point in the history
  • Loading branch information
gbgabo committed Feb 19, 2021
1 parent 808f38c commit 8d745d0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ tsearch: ${CONFIG_FOLDER} ${BIN_FOLDER} tyaml
install tsearch/params.yaml ${CONFIG_FOLDER}
@echo "done!"

tgit: ${CONFIG_FOLDER} ${BIN_FOLDER}
@echo "Installing tgit..."
install -m 555 tgit/tgit ${BIN_FOLDER}
install -m 555 tgit/dmenu_tgit ${BIN_FOLDER}
install -m 555 tgit/tgit_status ${BIN_FOLDER}
@echo "done!"

tpomodoro: ${CONFIG_FOLDER} ${BIN_FOLDER}
@echo "Installing tpomodoro..."
install -m 555 tpomodoro/tpomodoro ${BIN_FOLDER}
Expand Down Expand Up @@ -80,7 +87,7 @@ uninstall:
rm -f ${BIN_FOLDER}/tprogbar
@echo "done!"

install: tsearch ttodo tmenu tyaml tnotes tgoeswall tpomodoro tprogbar
install: tsearch ttodo tmenu tyaml tnotes tgoeswall tpomodoro tprogbar tgit
@echo "tinytools installed successfully!"

.PHONY: install tsearch tpomodoro ttodo tmenu tyaml tnotes tgoeswall uninstall tprogbar
.PHONY: install tsearch tpomodoro ttodo tmenu tyaml tnotes tgoeswall uninstall tprogbar tgit
6 changes: 2 additions & 4 deletions tgit/dmenu_tgit
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash

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

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

Expand Down
5 changes: 2 additions & 3 deletions tgit/tgit
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash

check_status="/home/gabo/packages/tinytools/tgit/check_status"
repos=''

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

0 comments on commit 8d745d0

Please sign in to comment.