Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
Andrei Jiroh Eugenio Halili 2021-08-15 22:10:53 +08:00
commit d3a9785764
Signed by: ajhalili2006
GPG Key ID: A30EBE40AD856D88
5 changed files with 18 additions and 11 deletions

View File

@ -19,4 +19,7 @@ apt-get install vault gh terraform -y
apt-get install -t buster-backports git -y
# https://unix.stackexchange.com/questions/12702/no-manual-page-for-regex-in-section-3-where-is-it#12705
#apt install manpages manpages-dev manpages-posix manpages-posix-dev -y
#apt install manpages manpages-dev manpages-posix manpages-posix-dev -y
# btw we need code-server, because Cloud Code sucks.
curl -fsSL https://code-server.dev/install.sh | sh

0
.vscode/extensions/.gitkeep vendored Normal file
View File

4
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,4 @@
{
"workbench.iconTheme": "vscode-icons",
"git.alwaysSignOff": true
}

View File

@ -138,7 +138,7 @@ cleanup() {
rm -rfv ~/{shellcheck,flarectl,LICENSE,README.txt,README.md}
pkg uninstall clang --yes && apt autoremove --yes
else
rm -rfv ~/{shellcheck,flarectl,LICENSE,README.txt,README.md} || true
rm -rfv ~/{shellcheck,flarectl,LICENSE,README.txt,README.md}* || true
unset PREFIX
fi
success "Setting up a new Linux machine was succesfully executed. To ensure no secrets are leaked when logging utfrom shell session, please do 'history -c' to cleanup shell history."
@ -156,9 +156,9 @@ copyKeysSSH() {
cp "$HOME/.dotfiles/secrets/ssh/launchpad.pub" "~/.ssh/launchpad.pub"
chmod 600 "~/.ssh/launchpad"
else
[ ! -f " ~/.ssh/launchpad" ] && cp "$HOME/.dotfiles/secrets/ssh/launchpad" "~/.ssh/launchpad"
[ ! -f " ~/.ssh/launchpad.pub" ] && "cp $HOME/.dotfiles/secrets/ssh/launchpad.pub" "~/.ssh/launchpad.pub"
chmod 600 "~/.ssh/launchpad"
[ ! -f "~/.ssh/launchpad" ] && cp "$HOME/.dotfiles/secrets/ssh/launchpad" "~/.ssh/launchpad"
[ ! -f "~/.ssh/launchpad.pub" ] && "cp $HOME/.dotfiles/secrets/ssh/launchpad.pub" "~/.ssh/launchpad.pub"
[ -f "~/.ssh/launchpad.pub" ] && chmod 600 "~/.ssh/launchpad"
fi
echoStageName "Linking config files"
@ -217,24 +217,24 @@ installShellCheck() {
current_path_dir=$(dirname $current_shellcheck_path)
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv -C "$HOME"
if [[ $current_shellcheck_path == "" ]]; then
cp "shellcheck-${scversion}/shellcheck" "$PREFIX/bin"
cp "$HOME/shellcheck-${scversion}/shellcheck" "$PREFIX/bin"
elif [[ $current_shellcheck_path == "$PREFIX/bin/shellcheck" ]]; then
warn "Current ShellCheck install found in $PREFIX/bin, replacing with latest stable release..."
if [[ $isOwnedByUser == "" ]]; then
warn "Owned by either other user/root, summoning root"
sudo rm "${PREFIX}/bin/shellcheck"
[ -f "$PREFIX/bin/shellcheck" ] && warn "Owned by either other user/root, summoning root" && sudo rm "${PREFIX}/bin/shellcheck"
else
rm "${PREFIX}/bin/shellcheck"
fi
cp "shellcheck-${scversion}/shellcheck" "$PREFIX/bin"
cp "$HOME/shellcheck-${scversion}/shellcheck" "$PREFIX/bin"
else
warn "Current ShellCheck install found in $current_path_dir, will be removed..."
if [[ $isOwnedByUser == "" ]]; then
sudo rm "${PREFIX}/bin/shellcheck"
warn "Owned by either other user/root, summoning root"
sudo rm "$current_path_dir/shellcheck"
else
rm "${PREFIX}/bin/shellcheck"
fi
cp "shellcheck-${scversion}/shellcheck" "$PREFIX/bin"
cp "$HOME/shellcheck-${scversion}/shellcheck" "$PREFIX/bin"
fi
fi
}