Various Kubernetes-related scenarios to use as kubectl plug-ins.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
616 B

path = ~/.shellrc/bin/scripts
find := $(shell { command -v gfind || command -v find; } 2>&-)
all: install
mkdir:
5 years ago
@mkdir -p $(path)
rmdir:
5 years ago
@rmdir $(path) 2>&-; :
install: mkdir
5 years ago
@$(find) . \
-maxdepth 1 \
5 years ago
\( -type f -o -type l \) \
5 years ago
-executable \
-exec basename {} \; \
| while read -r line; do \
5 years ago
ln -v -s $$(realpath -- $$line) $(path)/$$line 2>&-; \
5 years ago
done; \
true
rmlinks:
@$(find) . \
-maxdepth 1 \
5 years ago
\( -type f -o -type l \) \
5 years ago
-executable \
-exec basename {} \; \
| xargs -IF rm -fv $(path)/F
uninstall: rmlinks rmdir
clean: uninstall
.PHONY: all mkdir rmdir install uninstall clean