Skip to content
Snippets Groups Projects
Commit f30effa5 authored by nimrod's avatar nimrod
Browse files

- Notify about generating SSH config in the post-merge git hook.

- Added Documents/bin directory for scripts, moved renew-certs,
train-wifi and dma-clean (wasn't commited before) there.
- Made gen-ssh-config a script (in Documents/bin) instead of a shell
alias. Call said script in the post-merge git hook (instead of sourcing
bashrc which currently just exits if not running interactively which I
like to keep doing). Added said scripts to pre-commit.
parent 064dbf07
Branches
No related tags found
No related merge requests found
...@@ -48,6 +48,7 @@ export PATH=$PATH:$HOME/Documents/Shore/cleanup ...@@ -48,6 +48,7 @@ export PATH=$PATH:$HOME/Documents/Shore/cleanup
export PATH=$PATH:$HOME/Documents/Shore/ssh-ca export PATH=$PATH:$HOME/Documents/Shore/ssh-ca
export PATH=$PATH:$HOME/Documents/Shore/ssl-ca export PATH=$PATH:$HOME/Documents/Shore/ssl-ca
export PATH=$PATH:$HOME/.cargo/bin export PATH=$PATH:$HOME/.cargo/bin
export PATH=$PATH:$HOME/Documents/bin
export PYTHONSTARTUP=~/.pythonstartup export PYTHONSTARTUP=~/.pythonstartup
export AWS_DEFAULT_PROFILE='shore' export AWS_DEFAULT_PROFILE='shore'
export ANSIBLE_VERBOSITY=2 export ANSIBLE_VERBOSITY=2
...@@ -64,7 +65,6 @@ alias missing-recommends="aptitude search '~RBrecommends:~i'" ...@@ -64,7 +65,6 @@ alias missing-recommends="aptitude search '~RBrecommends:~i'"
alias deinstalled="dpkg --get-selections | awk '\$2==\"deinstall\" {print \$1}'" alias deinstalled="dpkg --get-selections | awk '\$2==\"deinstall\" {print \$1}'"
alias ansible-local='ansible localhost -c local -i localhost,' alias ansible-local='ansible localhost -c local -i localhost,'
alias ansible-local-playbook='ansible-playbook -i localhost, -c local' alias ansible-local-playbook='ansible-playbook -i localhost, -c local'
alias gen-ssh-config='cat $HOME/.ssh/config.d/* > $HOME/.ssh/config'
alias concat="perl -pe 's/\n/\\\n/g'" alias concat="perl -pe 's/\n/\\\n/g'"
alias deconcat="perl -pe 's/\\\n/\n/g'" alias deconcat="perl -pe 's/\\\n/\n/g'"
alias ggo='sudo GOPATH=/usr/share/go go' alias ggo='sudo GOPATH=/usr/share/go go'
......
#!/bin/sh #!/bin/sh
set -eu set -eu
cd "$(git rev-parse --show-toplevel)" cd "$(git rev-parse --show-toplevel)"
. ./.bashrc echo Generating SSH config
gen-ssh-config Documents/bin/gen-ssh-config
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
sha: v0.5.3 sha: v0.5.3
hooks: hooks:
- id: shell-lint - id: shell-lint
files: &shellscripts 'bashrc|post-merge|profile|docker-|train-wifi|renew-certs' files: &shellscripts 'bashrc|post-merge|profile|docker-|train-wifi|renew-certs|dma-clean|gen-ssh-config'
- id: shellcheck - id: shellcheck
files: *shellscripts files: *shellscripts
#!/bin/sh
set -eu
service cron stop
ps aux | awk '/dma|send-mail/ {print $2}' | xargs kill
find /var/spool/dma \! -name flush -delete
service cron start
#!/bin/sh
set -eu
find "$HOME/.ssh/config.d/" -type f -exec cat {} \; > "$HOME/.ssh/config"
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment