Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
Signed-off-by: Jaid <6216144+Jaid@users.noreply.github.com>
  • Loading branch information
Jaid committed Oct 15, 2023
1 parent 3fb29db commit 1707ac5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions main/config.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
githubToken=ghp_000000000000000000000000000000000000

installCoolTools=0
installGh=0
installGh=1
installCargo=1
installSd=0
installJyt=1
Expand All @@ -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
18 changes: 9 additions & 9 deletions main/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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"/*
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```

0 comments on commit 1707ac5

Please sign in to comment.