aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-04-22 09:48:30 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-04-22 09:48:30 -0700
commit4bee1c911c0a710da47b62a31e84535d2e0b7c76 (patch)
tree05e86e31bfa55eebeb8b698e5e56590c66ab34ac /bin
parent1f312a24606b09cf1a41aa79946b1963a242f648 (diff)
chore(organize): restructured build to allow for parallel projects to sys functionality
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tmux-send4
-rwxr-xr-xbin/updatedirs25
2 files changed, 20 insertions, 9 deletions
diff --git a/bin/tmux-send b/bin/tmux-send
index 47a6de8..b2e7fd4 100755
--- a/bin/tmux-send
+++ b/bin/tmux-send
@@ -4,6 +4,10 @@ dir=$1
tty=$(tmux list-panes -F "#{pane_active}#{pane_tty}" | grep '^1' | cut -c2-)
vim=$(ps -o stat=,command= -t $tty | awk 'BEGIN{flag=0} {if($1 ~ /S*+/ && $2 ~ /nvim/){flag +=1}}; END {print flag}')
+echo $dir
+echo $tty
+echo $vim
+
if [ $vim -gt 0 ]; then
case $dir in
up)
diff --git a/bin/updatedirs b/bin/updatedirs
index bb646e0..1ec2e25 100755
--- a/bin/updatedirs
+++ b/bin/updatedirs
@@ -3,15 +3,22 @@
import os
ROOT = "/home/nolln/root"
-SRC = "sys"
-BUILD = "build"
-TEST = "test"
+SRCS = ["src", "sys"]
+BUILD = ".build"
+TEST = ".test"
IGNORED = ["build", "include", "lib", "bin", ".git", "vendor", "obj", "dep", ".generated"]
if __name__ == "__main__":
- for root, dirs, _ in os.walk(f"{ROOT}/{SRC}"):
- dirs[:] = [d for d in dirs if d not in IGNORED]
- for newroot in [BUILD, TEST]:
- blddir = f"{ROOT}/{newroot}/{root[len(ROOT)+len(SRC)+2:]}"
- if not os.path.exists(blddir):
- os.mkdir(blddir)
+ if not os.path.exists(BUILD):
+ os.mkdir(BUILD)
+
+ if not os.path.exists(TEST):
+ os.mkdir(TEST)
+
+ for SRC in SRCS:
+ for root, dirs, _ in os.walk(f"{ROOT}/{SRC}"):
+ dirs[:] = [d for d in dirs if d not in IGNORED]
+ for newroot in [BUILD, TEST]:
+ blddir = f"{ROOT}/{newroot}/{SRC}/{root[len(ROOT)+len(SRC)+2:]}"
+ if not os.path.exists(blddir):
+ os.mkdir(blddir)