From 1707ac5872bf613a0dbd57f6b97b9e77ad4ca258 Mon Sep 17 00:00:00 2001 From: Jaid <6216144+Jaid@users.noreply.github.com> Date: Sun, 15 Oct 2023 23:03:02 +0200 Subject: [PATCH] Update Signed-off-by: Jaid <6216144+Jaid@users.noreply.github.com> --- main/config.bash | 6 +++--- main/setup.bash | 18 +++++++++--------- readme.md | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/main/config.bash b/main/config.bash index 599a85a..aab5942 100644 --- a/main/config.bash +++ b/main/config.bash @@ -1,7 +1,7 @@ githubToken=ghp_000000000000000000000000000000000000 installCoolTools=0 -installGh=0 +installGh=1 installCargo=1 installSd=0 installJyt=1 @@ -24,6 +24,6 @@ downloadGitconfig=1 # https://gist.github.com/Jaid/b81a839a438693a86718d3bb downloadLocaleGen=1 # https://gist.github.com/Jaid/eac9757fdb899067a64f5880524823d9 downloadDockerConfig=1 # https://gist.github.com/Jaid/3d590adcd183762ad7edffa5eff82c26 -userTempFolder=$HOME/tmp +userTempFolder=$HOME/temp userBinFolder=$HOME/x -otherReposFolder=$HOME/git/foreign +foreignReposFolder=$HOME/git/.foreign diff --git a/main/setup.bash b/main/setup.bash index 3a5fa07..7a397bd 100644 --- a/main/setup.bash +++ b/main/setup.bash @@ -8,10 +8,10 @@ function hasCommand { fi } -userTempFolder=${userTempFolder:-$HOME/tmp} +userTempFolder=${userTempFolder:-$HOME/temp} source "$userTempFolder/config.bash" -export githubToken && export installCoolTools && export installGh && export installCargo && export installSd && export installJyt && export installLfs && export installRustScan && export installExa && export installRg && export installFd && export installGrc && export installDocker && export installZsh && export downloadAuthorizedKeys && export downloadBashrc && export downloadPath && export downloadEnv && export downloadSecrets && export downloadHtoprc && export downloadGitconfig && export downloadLocaleGen && export downloadDockerConfig && export userTempFolder && export userBinFolder && export otherReposFolder +export githubToken && export installCoolTools && export installGh && export installCargo && export installSd && export installJyt && export installLfs && export installRustScan && export installExa && export installRg && export installFd && export installGrc && export installDocker && export installZsh && export downloadAuthorizedKeys && export downloadBashrc && export downloadPath && export downloadEnv && export downloadSecrets && export downloadHtoprc && export downloadGitconfig && export downloadLocaleGen && export downloadDockerConfig && export userTempFolder && export userBinFolder && export foreignReposFolder if [[ -z $githubToken ]]; then printf >&2 'Error: $githubToken not set\n' @@ -29,17 +29,17 @@ export GITHUB_TOKEN mkdir --parents "$HOME/.cache" mkdir --parents "$HOME/.config" mkdir --parents "$userBinFolder" -mkdir --parents "$otherReposFolder" +mkdir --parents "$foreignReposFolder" -PATH=$PATH:$otherReposFolder/scripts/bin:$HOME/.cargo/bin +PATH=$PATH:$foreignReposFolder/scripts/bin:$HOME/.cargo/bin export PATH -mkdir --parents "$otherReposFolder" -if [[ -d $otherReposFolder/scripts ]]; then - rm -rf "$otherReposFolder/scripts" +mkdir --parents "$foreignReposFolder" +if [[ -d $foreignReposFolder/scripts ]]; then + rm -rf "$foreignReposFolder/scripts" fi -if [[ -d $otherReposFolder/setup-server ]]; then - rm -rf "$otherReposFolder/setup-server" +if [[ -d $foreignReposFolder/setup-server ]]; then + rm -rf "$foreignReposFolder/setup-server" fi curl --location --retry 3 --fail --silent --show-error --header 'Cache-Control: no-cache' --header "Authorization: Bearer $GITHUB_TOKEN" https://raw.githubusercontent.com/Jaid/scripts/dist/bin/downloadJaidScripts --output "$userBinFolder/downloadJaidScripts" chmod +x "$userBinFolder"/* diff --git a/readme.md b/readme.md index 2ecf388..85575f8 100644 --- a/readme.md +++ b/readme.md @@ -5,17 +5,17 @@ ### Create config ```bash -DEBIAN_FRONTEND=noninteractive sudo apt-get --option Acquire::Retries=60 --option Acquire::http::Timeout=180 --yes update && DEBIAN_FRONTEND=noninteractive sudo apt-get --option Acquire::Retries=60 --option Acquire::http::Timeout=180 --yes upgrade && DEBIAN_FRONTEND=noninteractive sudo apt-get --option Acquire::Retries=60 --option Acquire::http::Timeout=180 --yes install curl && mkdir --parents "$HOME/tmp" && curl --location --retry 3 --fail --silent --show-error --header 'Cache-Control: no-cache' https://raw.githubusercontent.com/Jaid/setup-server/main/main/config.bash --output "$HOME/tmp/config.bash" +DEBIAN_FRONTEND=noninteractive sudo apt-get --option Acquire::Retries=60 --option Acquire::http::Timeout=180 --yes update && DEBIAN_FRONTEND=noninteractive sudo apt-get --option Acquire::Retries=60 --option Acquire::http::Timeout=180 --yes upgrade && DEBIAN_FRONTEND=noninteractive sudo apt-get --option Acquire::Retries=60 --option Acquire::http::Timeout=180 --yes install curl && mkdir --parents "$HOME/temp" && curl --location --retry 3 --fail --silent --show-error --header 'Cache-Control: no-cache' https://raw.githubusercontent.com/Jaid/setup-server/main/main/config.bash --output "$HOME/temp/config.bash" ``` ### Edit config (optional) ```bash -nano "$HOME/tmp/config.bash" && cat "$HOME/tmp/config.bash" +nano "$HOME/temp/config.bash" && cat "$HOME/temp/config.bash" ``` ### Run ```bash -DEBIAN_FRONTEND=noninteractive sudo apt-get --option Acquire::Retries=60 --option Acquire::http::Timeout=180 --yes install git jq && curl --location --retry 3 --fail --silent --show-error --header 'Cache-Control: no-cache' https://raw.githubusercontent.com/Jaid/setup-server/main/main/setup.bash --output "$HOME/tmp/setup.bash" && bash -o xtrace "$HOME/tmp/setup.bash" |& tee --append "$HOME/tmp/setup.log" +DEBIAN_FRONTEND=noninteractive sudo apt-get --option Acquire::Retries=60 --option Acquire::http::Timeout=180 --yes install git jq && curl --location --retry 3 --fail --silent --show-error --header 'Cache-Control: no-cache' https://raw.githubusercontent.com/Jaid/setup-server/main/main/setup.bash --output "$HOME/temp/setup.bash" && bash -o xtrace "$HOME/temp/setup.bash" |& tee --append "$HOME/temp/setup.log" ``` \ No newline at end of file