diff --git a/cmd.sh b/cmd.sh index c5dca90..6665a73 100755 --- a/cmd.sh +++ b/cmd.sh @@ -10,6 +10,7 @@ BITEM=( "h/helm" "i/ip" "i/istioctl" + "j/jq" "k/kubectl" "l/ls" "p/ps" @@ -27,6 +28,7 @@ CITEM=( "helm" "ifconfig" "istioctl" + "jq" "kubectl" "ls" "ps" diff --git a/src/a/all/vpn b/src/a/all/vpn index 84a078f..0f5c01b 100755 --- a/src/a/all/vpn +++ b/src/a/all/vpn @@ -1,3 +1,3 @@ #!/usr/bin/env sh set -xue ; -sshuttle -r "$1" "0/0" "${@:2}" ; +sshuttle --dns -r "$1" "0/0" "${@:2}" ; diff --git a/src/g/git/glnrhm b/src/g/git/glnrhm new file mode 100755 index 0000000..fd0400c --- /dev/null +++ b/src/g/git/glnrhm @@ -0,0 +1,3 @@ +#!/usr/bin/env sh +set -xue ; +git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main "$@" ; diff --git a/src/g/git/gsmuo b/src/g/git/gsmuo new file mode 100755 index 0000000..5f692c4 --- /dev/null +++ b/src/g/git/gsmuo @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +set -xue ; +for DPATH in ./*/ ; do + cd ${DPATH} ; + echo "Directory : ${DPATH%*/}" ; + git remote update --prune ; + git checkout master ; + git reset --hard origin/master ; + "$@" ; + echo "" ; + cd .. ; +done ; diff --git a/src/j/jq/jfmt b/src/j/jq/jfmt new file mode 100755 index 0000000..3e72bfd --- /dev/null +++ b/src/j/jq/jfmt @@ -0,0 +1,9 @@ +#!/usr/bin/env sh +set -xue ; +for FPATH in $( find $1 -type f ) ; do + TPATH="${FPATH}.tmp" ; + mv "${FPATH}" "${TPATH}" ; + jq "${@:2}" < "${TPATH}" > "${FPATH}" ; + rm "${TPATH}" ; + echo "" ; +done ; diff --git a/src/t/terraform/tffmt b/src/t/terraform/tffmt new file mode 100755 index 0000000..87e3c44 --- /dev/null +++ b/src/t/terraform/tffmt @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +set -xue ; +for DPATH in $( find "$@" -type d ) ; do + terraform fmt "${DPATH}" ; +done ;