add yes/no option
This commit is contained in:
parent
fefb929d7d
commit
0788f3d90f
35
post.sh
35
post.sh
@ -1,24 +1,35 @@
|
|||||||
#!/usr/bin/sh
|
#!/usr/bin/sh
|
||||||
|
|
||||||
|
prmpt() {
|
||||||
|
while true; do
|
||||||
|
read -p "Do you wish to $1? " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) $2; break;;
|
||||||
|
[Nn]* ) break;;
|
||||||
|
* ) echo "Please answer yes or no";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Change default shell to zsh
|
# Change default shell to zsh
|
||||||
echo "Changing shell to zsh..."
|
prmpt "change default shell to zsh" "chsh -s $(which zsh)"
|
||||||
chsh -s $(which zsh)
|
|
||||||
|
|
||||||
# Set up Git
|
# Set up Git
|
||||||
echo "Setting up git and GitHub..."
|
prmpt "set up git?" 'git config --global user.email "isshi0417@gmail.com"'
|
||||||
git config --global user.email "isshi0417@gmail.com"
|
echo "Git configuration complete!"
|
||||||
gh auth login
|
|
||||||
|
prmpt "authorize GitHub HTTP" "gh auth login"
|
||||||
|
|
||||||
# Symlink dotfiles
|
# Symlink dotfiles
|
||||||
echo "Symlinking dotfiles..."
|
prmpt "symlink dotfiles" "stow */"
|
||||||
cd dotfiles
|
|
||||||
stow */
|
|
||||||
|
|
||||||
# Configure spicetify
|
# Configure spicetify
|
||||||
spicetify backup apply
|
prmpt "set up spicetify" "spicetify backup apply"
|
||||||
|
|
||||||
# Set up onedrive
|
# Set up onedrive
|
||||||
brew services start onedrive
|
prmpt "set up OneDrive autostart" "brew services start onedrive"
|
||||||
onedrive
|
prmpt "log into OneDrive" "onedrive"
|
||||||
onedrive --synchronize
|
prmpt "synchronize OneDrive right now" "onedrive --synchronize"
|
||||||
|
|
||||||
|
# Restart
|
||||||
|
prmpt "restart now" "systemctl restart"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user