-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add for macOS and linux (Ubuntu)
- Loading branch information
Showing
18 changed files
with
205 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 | ||
echo '. "$HOME/.asdf/asdf.sh"' >>~/.bashrc | ||
echo '. "$HOME/.asdf/completions/asdf.bash"' >>~/.bashrc | ||
source ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
sudo apt install -y curl software-properties-common apt-transport-https lsb-release | ||
sudo apt update && sudo apt upgrade -y | ||
|
||
# Load git-prompt.sh to use __git_ps1 for Git branch name | ||
echo "# Load git prompt script for version control information" >> ~/.bashrc | ||
echo "if type __git_ps1 &>/dev/null; then" >> ~/.bashrc | ||
echo " GIT_PS1_SHOWDIRTYSTATE=1" >> ~/.bashrc | ||
echo " GIT_PS1_SHOWSTASHSTATE=1" >> ~/.bashrc | ||
echo " GIT_PS1_SHOWUNTRACKEDFILES=1" >> ~/.bashrc | ||
echo " GIT_PS1_SHOWUPSTREAM='auto'" >> ~/.bashrc | ||
echo " PROMPT_COMMAND='__git_ps1 \"\\[\\e[32m\\]\\w\\[\\e[0m\\]\" \" \\\$ \" \""'"'%F{87}(%s)%f'"'"'\"'" >> ~/.bashrc | ||
echo "else" >> ~/.bashrc | ||
echo " PS1='\\[\\e[32m\\]\\w\\[\\e[0m\\] \$ '" >> ~/.bashrc | ||
echo "fi" >> ~/.bashrc | ||
echo "" >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
curl -sSL https://install.python-poetry.org | python3 | ||
echo 'export PATH="$HOME/.local/bin:$PATH"' >>~/.bashrc | ||
source ~/.bashrc |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
brew install asdf | ||
echo ". /opt/homebrew/opt/asdf/libexec/asdf.sh" >>~/.zshrc | ||
source ~/.zshrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
( | ||
echo | ||
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' | ||
) >>~/.zprofile | ||
eval "$(/opt/homebrew/bin/brew shellenv)" | ||
source ~/.zprofile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# Reset Launchpad | ||
# ////////////////////////////////////////////////// | ||
defaults write com.apple.dock ResetLaunchPad -bool true | ||
killall Dock | ||
|
||
# Display full path in Finder title bar | ||
# ////////////////////////////////////////////////// | ||
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true | ||
|
||
# Show path bar in Finder | ||
# ////////////////////////////////////////////////// | ||
defaults write com.apple.finder ShowPathbar -bool true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
curl -sSL https://install.python-poetry.org | python3 | ||
echo 'export PATH="$HOME/.local/bin:$PATH"' >>~/.zshrc | ||
source ~/.zshrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
echo "# Load version control information" >>~/.zshrc | ||
echo "autoload -Uz vcs_info" >>~/.zshrc | ||
echo "precmd() { vcs_info }" >>~/.zshrc | ||
echo "" >>~/.zshrc | ||
echo "# Format the vcs_info_msg_0_ variable" >>~/.zshrc | ||
echo "zstyle ':vcs_info:git:*' formats ' %F{87}(%b)%f'" >>~/.zshrc | ||
echo "" >>~/.zshrc | ||
echo "# Set up the prompt (with git branch name)" >>~/.zshrc | ||
echo "setopt PROMPT_SUBST" >>~/.zshrc | ||
echo "PROMPT='[%F{82}%~%f]\${vcs_info_msg_0_} $ '" >>~/.zshrc | ||
echo "" >>~/.zshrc | ||
source ~/.zshrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
npm install -g npm | ||
npm install -g npm@latest | ||
npm install -g pnpm | ||
npm install -g npm-check-updates | ||
npm install -g @leoli0605/git-setup |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import fs from 'fs'; | ||
import path, { dirname } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import { getAppDir } from './dirname.mjs'; | ||
import ShellScript from './shell_script.mjs'; | ||
|
||
const __dirname = getAppDir(); | ||
|
||
class Bash extends ShellScript { | ||
constructor() { | ||
super(); | ||
this.scripts.push('#!/bin/bash\n'); | ||
} | ||
|
||
getScript() { | ||
const paths = this.environment.map((e) => `"${e}"`).join(',\n '); | ||
let envSetup = fs.readFileSync(path.join(__dirname, '/scripts/windows/EnvSetup.ps1'), 'utf8'); | ||
envSetup = envSetup.replace('${PATHS}', paths); | ||
this.scripts.push(envSetup + '\n'); | ||
this.scripts.push(this.commands.join('\n')); | ||
return this.scripts.toString().replace(/(^,)/gm, '') + '\n'; | ||
} | ||
} | ||
|
||
export default Bash; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters