Move installation scripts to install/ dir
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -E -o errexit -o nounset -o pipefail
|
||||
trap cleanup SIGINT SIGTERM ERR EXIT
|
||||
|
||||
AWS_CLI_URL="https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"
|
||||
AWS_CLI_ZIP="/tmp/awscliv2.zip"
|
||||
AWS_CLI_HOME="$LWS/opt/aws"
|
||||
|
||||
function cleanup() {
|
||||
trap - SIGINT SIGTERM ERR EXIT
|
||||
rm -f "$AWS_CLI_ZIP"
|
||||
unset AWS_CLI_URL AWS_CLI_ZIP AWS_CLI_HOME
|
||||
}
|
||||
|
||||
function awscli_install() {
|
||||
if [[ -d "$AWS_CLI_HOME" ]]; then
|
||||
echo "awscli already installed"
|
||||
echo "For reinstall delete $AWS_CLI_HOME directory"
|
||||
else
|
||||
wget -O "$AWS_CLI_ZIP" "$AWS_CLI_URL"
|
||||
atool -X "$LWS/opt/" "$AWS_CLI_ZIP"
|
||||
ln -s -f "$AWS_CLI_HOME/dist/aws" "$LWS/opt/bin/aws"
|
||||
fi
|
||||
}
|
||||
|
||||
awscli_install
|
||||
@@ -1,10 +0,0 @@
|
||||
# Spotifi HiDPI
|
||||
#alias spotify="/snap/bin/spotify --force-device-scale-factor=2"
|
||||
|
||||
# Zoom HiDPI
|
||||
alias zoom='export QT_DEVICE_PIXEL_RATIO=2; /usr/bin/zoom'
|
||||
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
sudo snap install --classic kotlin
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://docs.docker.com/engine/install/ubuntu/
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
sudo apt-get remove -y --ignore-missing docker docker.io containerd runc
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ca-certificates curl gnupg lsb-release
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
||||
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
|
||||
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose docker-compose-plugin
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||
mkdir -p $DOCKER_CONFIG/cli-plugins
|
||||
curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://github.com/b4b4r07/enhancd
|
||||
|
||||
brew tap jhawthorn/fzy
|
||||
brew install fzy ccat percol peco fzf
|
||||
git clone https://github.com/b4b4r07/enhancd $WORKSPACE/opt/enhancd
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -E -o errexit -o nounset -o pipefail
|
||||
set -x
|
||||
|
||||
GIT_PROMPT_PATH=${GIT_PROMPT_PATH:-$LWS/opt/bash-git-prompt}
|
||||
|
||||
readonly REPO="https://github.com/magicmonty/bash-git-prompt.git"
|
||||
|
||||
if [[ ! -d "$GIT_PROMPT_PATH" ]]; then
|
||||
git clone "$REPO" "$GIT_PROMPT_PATH" --depth=1
|
||||
fi
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
function go_install() {
|
||||
local module="$1"
|
||||
echo "Installing $module"
|
||||
go install ${module}@latest
|
||||
}
|
||||
|
||||
go_install golang.org/x/tools/cmd/goimports
|
||||
go_install github.com/nsf/gocode
|
||||
go_install golang.org/x/lint/golint
|
||||
go_install github.com/godoctor/godoctor
|
||||
go_install github.com/haya14busa/goplay/cmd/goplay
|
||||
go_install github.com/rogpeppe/godef
|
||||
go_install golang.org/x/tools/cmd/gorename
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://github.com/To-da/gdub
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
readonly REPO="https://github.com/To-da/gdub.git"
|
||||
readonly GW_PATH="$LWS/opt/gdub"
|
||||
readonly GW_BIN="$GW_PATH/bin/gw"
|
||||
readonly OPT_BIN_PATH="$LWS/opt/bin"
|
||||
|
||||
if [[ -f "$OPT_BIN_PATH/gw" ]]; then
|
||||
echo "gw already installed"
|
||||
exit 0
|
||||
fi
|
||||
if [[ ! -d "$GW_PATH" ]]; then
|
||||
git clone "$REPO" "$GW_PATH"
|
||||
fi
|
||||
if [[ ! -d "$OPT_BIN_PATH" ]]; then
|
||||
mkdir "$OPT_BIN_PATH"
|
||||
fi
|
||||
cp "$GW_BIN" "$OPT_BIN_PATH/"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://docs.brew.sh/Homebrew-on-Linux
|
||||
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -E -o errexit -o nounset -o pipefail
|
||||
|
||||
cat $LWS/conf/packages.txt | grep -v '^\s*#' | sudo xargs apt-get install -y
|
||||
@@ -1,96 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -E -o errexit -o nounset -o pipefail
|
||||
|
||||
readonly SOURCE=${BASH_SOURCE:-k3s-install}
|
||||
readonly SCRIPT_NAME=$(basename "$SOURCE")
|
||||
readonly ERROR_CODE=90
|
||||
|
||||
function print_help() {
|
||||
cat <<-EOT
|
||||
use: $SCRIPT_NAME <action> [args]
|
||||
actions:
|
||||
token
|
||||
server
|
||||
agent <server-url> <node-token>
|
||||
status server|agent
|
||||
config
|
||||
help
|
||||
EOT
|
||||
exit $ERROR_CODE
|
||||
}
|
||||
|
||||
function read_token() {
|
||||
cat /var/lib/rancher/k3s/server/node-token
|
||||
}
|
||||
|
||||
function install_server() {
|
||||
curl -sfL https://get.k3s.io | sh -
|
||||
}
|
||||
|
||||
function install_agent() {
|
||||
curl -sfL https://get.k3s.io | K3S_URL="$1" K3S_TOKEN="$2" sh -
|
||||
}
|
||||
|
||||
function status_server() {
|
||||
systemctl status k3s
|
||||
}
|
||||
|
||||
function status() {
|
||||
case $1 in
|
||||
server)
|
||||
systemctl status k3s
|
||||
;;
|
||||
agent)
|
||||
systemctl status k3s-agent
|
||||
;;
|
||||
*)
|
||||
echo "Unknown k3s type: $1"
|
||||
exit $ERROR_CODE
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function show_config_path() {
|
||||
echo "/etc/rancher/k3s/k3s.yaml"
|
||||
}
|
||||
|
||||
if [ "$#" == "0" ]; then
|
||||
print_help
|
||||
fi
|
||||
|
||||
action=$1
|
||||
shift
|
||||
|
||||
case "$action" in
|
||||
-h|--help|help)
|
||||
print_help
|
||||
;;
|
||||
|
||||
token)
|
||||
read_token
|
||||
;;
|
||||
|
||||
server)
|
||||
install_server
|
||||
;;
|
||||
|
||||
agent)
|
||||
k3s_url="$1"
|
||||
k3s_token="$2"
|
||||
install_agent "$k3s_url" "$k3s_token"
|
||||
;;
|
||||
|
||||
status)
|
||||
status $1
|
||||
;;
|
||||
|
||||
config)
|
||||
show_config_path
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown action: $action"
|
||||
exit $ERROR_CODE
|
||||
;;
|
||||
esac
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cat <<EOT
|
||||
# STEPS
|
||||
sudo snap install go
|
||||
cd ~/src/others/
|
||||
git clone https://github.com/MichaelMure/mdr
|
||||
cd mdr
|
||||
make
|
||||
cp mdr ~/bin/
|
||||
EOT
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# git clone https://github.com/MichaelMure/mdr.git ~/src/others/
|
||||
|
||||
set -o nounset
|
||||
set -x
|
||||
set -e
|
||||
|
||||
mdr=$WORKSPACE/opt/bin/mdr
|
||||
wget https://github.com/MichaelMure/mdr/releases/download/v0.2.5/mdr_linux_amd64 -O $mdr
|
||||
chmod +x $mdr
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://linuxhint.com/change-mouse-scroll-speed-ubuntu/
|
||||
|
||||
MOUSEWHEEL="$LWS/opt/bin/mousewheel.sh"
|
||||
|
||||
sudo apt install imwheel
|
||||
wget -O "$MOUSEWHEEL" http://www.nicknorton.net/mousewheel.sh
|
||||
chmod +x "$MOUSEWHEEL"
|
||||
unset MOUSEWHEEL
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
sudo snap install gradle --classic
|
||||
sudo apt install openjdk-11-jdk
|
||||
$LWS/scripts/git-prompt-install.sh
|
||||
$LWS/scripts/gw-install.sh
|
||||
$LWS/scripts/docker-ce-install.sh
|
||||
$LWS/scripts/docker-compose-2-install.sh
|
||||
$LWS/scripts/docker-noroot.sh
|
||||
$LWS/scripts/sublime-install.sh
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit -o nounset -o pipefail
|
||||
set -x
|
||||
|
||||
function pwsh_install_dotnet() {
|
||||
# https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux#install-as-a-net-global-tool
|
||||
dotnet tool install --global PowerShell
|
||||
dotnet tool update --global PowerShell
|
||||
}
|
||||
|
||||
function pwsh_install_apt() {
|
||||
# https://learn.microsoft.com/en-us/powershell/scripting/install/install-ubuntu
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y wget apt-transport-https software-properties-common
|
||||
wget -O /tmp/packages-microsoft-prod.deb "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
|
||||
sudo dpkg -i /tmp/packages-microsoft-prod.deb
|
||||
rm /tmp/packages-microsoft-prod.deb
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y powershell
|
||||
}
|
||||
|
||||
pwsh_install_apt
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://www.rust-lang.org/tools/install
|
||||
|
||||
set -E -o errexit -o nounset -o pipefail
|
||||
|
||||
sudo apt install curl -y
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
source "$HOME/.cargo/env"
|
||||
rustup update
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://sdkman.io/install
|
||||
|
||||
curl -s "https://get.sdkman.io" | bash
|
||||
|
||||
# todo pridat do .bashrc
|
||||
source "/home/lachtan/.sdkman/bin/sdkman-init.sh"
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://www.spotify.com/cz/download/linux/
|
||||
|
||||
set -x
|
||||
|
||||
curl -sS https://download.spotify.com/debian/pubkey.gpg | sudo apt-key add -
|
||||
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
|
||||
sudo apt-get update && sudo apt-get install spotify-client
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://www.sublimetext.com/docs/3/linux_repositories.html#apt
|
||||
|
||||
set -x
|
||||
|
||||
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
|
||||
sudo apt-get install apt-transport-https
|
||||
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install sublime-text
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Debian/Ubuntu packages
|
||||
# https://apt.syncthing.net/
|
||||
|
||||
# Configuration
|
||||
# https://docs.syncthing.net/users/config.html
|
||||
|
||||
# Autostart
|
||||
# https://docs.syncthing.net/users/autostart.html
|
||||
|
||||
sudo systemctl enable syncthing@lachtan
|
||||
sudo systemctl start syncthing@lachtan
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -E -o errexit -o nounset -o pipefail
|
||||
set -x
|
||||
|
||||
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor | sudo dd of=/usr/share/keyrings/vivaldi-browser.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/vivaldi-browser.gpg arch=$(dpkg --print-architecture)] https://repo.vivaldi.com/archive/deb/ stable main" | sudo dd of=/etc/apt/sources.list.d/vivaldi-archive.list
|
||||
sudo apt update
|
||||
sudo apt install vivaldi-stable
|
||||
Reference in New Issue
Block a user