add shfmt

This commit is contained in:
Aminda Suomalainen 2023-05-18 11:58:51 +03:00
parent 687a6433bb
commit 8fb52ec8f2
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
4 changed files with 42 additions and 37 deletions

View File

@ -2,19 +2,19 @@
# Do not use this script unless you know what you are doing! # Do not use this script unless you know what you are doing!
set -x set -x
git verify-commit HEAD git verify-commit HEAD
cat .mikaela/bash_aliases> ~/.bash_aliases cat .mikaela/bash_aliases >~/.bash_aliases
cat .mikaela/zsh_aliases > ~/.zsh_aliases cat .mikaela/zsh_aliases >~/.zsh_aliases
cat .mikaela/gitconfig > ~/.gitconfig cat .mikaela/gitconfig >~/.gitconfig
cat rc/xinitrc > ~/.xinitrc cat rc/xinitrc >~/.xinitrc
mkdir -p ~/.gnupg mkdir -p ~/.gnupg
cat .mikaela/gpg.conf> ~/.gnupg/gpg.conf cat .mikaela/gpg.conf >~/.gnupg/gpg.conf
cat .mikaela/pastebinit.xml > ~/.pastebinit.xml cat .mikaela/pastebinit.xml >~/.pastebinit.xml
cat .mikaela/environment > ~/.environment cat .mikaela/environment >~/.environment
cat .mikaela/gitconfig > ~/.gitconfig cat .mikaela/gitconfig >~/.gitconfig
mkdir -p ~/.ssh mkdir -p ~/.ssh
cat .mikaela/keys/authorized_keys > ~/.ssh/authorized_keys cat .mikaela/keys/authorized_keys >~/.ssh/authorized_keys
cat etc/ssh/ssh_config > ~/.ssh/config cat etc/ssh/ssh_config >~/.ssh/config
cat .editorconfig > ~/.editorconfig cat .editorconfig >~/.editorconfig
touch ~/.MIKAELA_GREP touch ~/.MIKAELA_GREP
set +x set +x
# vim : set ft=sh : # vim : set ft=sh :

View File

@ -80,6 +80,13 @@ repos:
# - id: black # - id: black
#- id: black-jupyter #- id: black-jupyter
# Shell code formatter, requires Go
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.6.0-2
hooks:
- id: shfmt
#- id: shfmt-docker
# .editorconfig validity checking # .editorconfig validity checking
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "2.7.1" rev: "2.7.1"

View File

@ -2,20 +2,20 @@
# FOR MY PERSONAL USE ONLY! # FOR MY PERSONAL USE ONLY!
mkdir -p /etc/ mkdir -p /etc/
cat oidentd.conf > /etc/oidentd.conf cat oidentd.conf >/etc/oidentd.conf
chmod a+r /etc/oidentd.conf chmod a+r /etc/oidentd.conf
mkdir -p /etc/profile.d/ mkdir -p /etc/profile.d/
cat profile.d/mikaela.sh > /etc/profile.d/mikaela.sh cat profile.d/mikaela.sh >/etc/profile.d/mikaela.sh
chmod a+r /etc/profile.d/mikaela.sh chmod a+r /etc/profile.d/mikaela.sh
mkdir -p /etc/systemd/system/ mkdir -p /etc/systemd/system/
cat systemd/system/oidentd.socket > /etc/systemd/system/oidentd.socket cat systemd/system/oidentd.socket >/etc/systemd/system/oidentd.socket
chmod a+r /etc/systemd/system/oidentd.socket chmod a+r /etc/systemd/system/oidentd.socket
mkdir -p /etc/sysctl.d/ mkdir -p /etc/sysctl.d/
if [ ! -f /etc/sysctl.d/60-mikaela.conf ]; then if [ ! -f /etc/sysctl.d/60-mikaela.conf ]; then
cat sysctl.d/60-mikaela.conf > /etc/sysctl.d/60-mikaela.conf cat sysctl.d/60-mikaela.conf >/etc/sysctl.d/60-mikaela.conf
chmod a+r /etc/sysctl.d/60-mikaela.conf chmod a+r /etc/sysctl.d/60-mikaela.conf
fi fi

42
install
View File

@ -6,48 +6,46 @@ git verify-commit HEAD
export MIKAELA_GREP=$HOME/.MIKAELA_GREP export MIKAELA_GREP=$HOME/.MIKAELA_GREP
cat rc/bashrc > ~/.bashrc cat rc/bashrc >~/.bashrc
cat conf/tmux.conf > ~/.tmux.conf cat conf/tmux.conf >~/.tmux.conf
cat rc/zshrc > ~/.zshrc cat rc/zshrc >~/.zshrc
cat rc/profile > ~/.profile cat rc/profile >~/.profile
cat conf/gitconfig > ~/.gitconfig cat conf/gitconfig >~/.gitconfig
mkdir -p ~/.git-template mkdir -p ~/.git-template
cat rc/vimrc > ~/.vimrc cat rc/vimrc >~/.vimrc
mkdir -p ~/.config/nvim/ mkdir -p ~/.config/nvim/
cat conf/init.vim > ~/.config/nvim/init.vim cat conf/init.vim >~/.config/nvim/init.vim
cat conf/makepkg.conf > ~/.makepkg.conf cat conf/makepkg.conf >~/.makepkg.conf
mkdir -p ~/.config/mpv/ mkdir -p ~/.config/mpv/
cat conf/mpv.conf > ~/.config/mpv/mpv.conf cat conf/mpv.conf >~/.config/mpv/mpv.conf
if [ ! -f ~/.oidentd.conf ]; then if [ ! -f ~/.oidentd.conf ]; then
cat conf/oidentd.conf > ~/.oidentd.conf cat conf/oidentd.conf >~/.oidentd.conf
fi fi
mkdir -p ~/.gnupg mkdir -p ~/.gnupg
cat gpg/gpg.conf > ~/.gnupg/gpg.conf cat gpg/gpg.conf >~/.gnupg/gpg.conf
cat gpg/gpg-agent.conf > ~/.gnupg/gpg-agent.conf cat gpg/gpg-agent.conf >~/.gnupg/gpg-agent.conf
cat gpg/dirmngr.conf > ~/.gnupg/dirmngr.conf cat gpg/dirmngr.conf >~/.gnupg/dirmngr.conf
killall -HUP dirmngr killall -HUP dirmngr
#cat rc/xinitrc > ~/.xinitrc #cat rc/xinitrc > ~/.xinitrc
cat conf/pastebinit.xml > ~/.pastebinit.xml cat conf/pastebinit.xml >~/.pastebinit.xml
cat conf/Xresources > ~/.Xresources cat conf/Xresources >~/.Xresources
mkdir -p ~/.inxi mkdir -p ~/.inxi
cat conf/inxi.conf > ~/.inxi/inxi.conf cat conf/inxi.conf >~/.inxi/inxi.conf
gpg --quiet --import .mikaela/keys/*.asc& gpg --quiet --import .mikaela/keys/*.asc &
mkdir -p ~/.ssh/sockets/ mkdir -p ~/.ssh/sockets/
chmod a+xr chmod chmod a+xr chmod
bash -x ./chmod& bash -x ./chmod &
if hash pre-commit 2>/dev/null; then if hash pre-commit 2>/dev/null; then
pre-commit init-templatedir ~/.git-template pre-commit init-templatedir ~/.git-template
pre-commit gc pre-commit gc
fi fi
if [ -f $HOME/.MIKAELAGREP ] if [ -f $HOME/.MIKAELAGREP ]; then
then
mv $HOME/.MIKAELAGREP $MIKAELA_GREP mv $HOME/.MIKAELAGREP $MIKAELA_GREP
fi fi
if [ -f "$MIKAELA_GREP" ] if [ -f "$MIKAELA_GREP" ]; then
then
bash -x .mikaela_install bash -x .mikaela_install
fi fi