-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(command): add command g git, j jq, and t terraform resources (#23)
- Loading branch information
Showing
6 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env sh | ||
set -xue ; | ||
sshuttle -r "$1" "0/0" "${@:2}" ; | ||
sshuttle --dns -r "$1" "0/0" "${@:2}" ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
set -xue ; | ||
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main "$@" ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
set -xue ; | ||
for DPATH in $( find "$@" -type d ) ; do | ||
terraform fmt "${DPATH}" ; | ||
done ; |