forked from atomantic/dotfiles
-
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.
configuring installer with user information and input (now it is all …
…automated). bwahahahahaha!
- Loading branch information
Showing
3 changed files
with
39 additions
and
16 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
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 |
---|---|---|
|
@@ -20,20 +20,6 @@ git clone --recurse-submodules https://github.com/atomantic/dotfiles ~/.dotfiles | |
``` | ||
## Setup | ||
|
||
> \\[._.]/ - Hey, wouldn't it be cool if I walked you through these next steps on the terminal? | ||
> Maybe you want to fork this repo and pull-request that to Adam! (he will probably get to it eventually) | ||
- Edit .gitconfig and change Adam's name to yours: | ||
``` | ||
[user] | ||
name = Adam Eivy | ||
email = [email protected] | ||
... | ||
[github] | ||
# https://github.com/blog/180-local-github-config | ||
user = atomantic | ||
``` | ||
- Change your user account system shell to zsh | ||
- Run the install script | ||
```bash | ||
./install.sh | ||
|
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 |
---|---|---|
|
@@ -10,7 +10,36 @@ | |
source ./lib.sh | ||
|
||
export UNLINK=false | ||
bot "Hi. I'm going to make your OSX system better." | ||
bot "Hi. I'm going to make your OSX system better. But first, I need to configure this project based on your info so you don't check in files to github as Adam Eivy from here on out :)" | ||
|
||
#fullname=`osascript -e "long user name of (system info)"` | ||
#me=`dscl . -read /Users/$(whoami)` | ||
lastname=`dscl . -read /Users/$(whoami) | grep LastName | sed "s/LastName: //"` | ||
firstname=`dscl . -read /Users/$(whoami) | grep FirstName | sed "s/FirstName: //"` | ||
email=`dscl . -read /Users/$(whoami) | grep EMailAddress | sed "s/EMailAddress: //"` | ||
|
||
|
||
echo -e "I see that your full name is $COL_YELLOW$firstname $lastname$COL_RESET" | ||
read -r -p "Is this correct? [Y|n] " response | ||
if [[ $response =~ ^(no|n|N) ]];then | ||
read -r -p "What is your first name? " firstname | ||
read -r -p "What is your last name? " lastname | ||
fi | ||
fullname="$firstname $lastname" | ||
|
||
bot "Great $fullname, " | ||
echo -e "The best I can make out, your email address is $COL_YELLOW$email$COL_RESET" | ||
read -r -p "Is this correct? [Y|n] " response | ||
if [[ $response =~ ^(no|n|N) ]];then | ||
read -r -p "What is your email? " email | ||
fi | ||
|
||
read -r -p "What is your github.com username? " githubuser | ||
|
||
running "replacing items in .gitconfig with your info ($COL_YELLOW$fullname, $email, $githubuser$COL_RESET)" | ||
sed -i 's/Adam Eivy/'$firstname' '$lastname'/' .gitconfig; | ||
sed -i 's/[email protected]/'$email'/' .gitconfig; | ||
sed -i 's/atomantic/'$githubuser'/' .gitconfig;ok | ||
|
||
# read -r -p "OK? [Y/n] " response | ||
# if [[ ! $response =~ ^(yes|y|Y| ) ]];then | ||
|
@@ -23,6 +52,14 @@ running "formatting configs for "$(whoami) | |
|
||
sed -i 's/eivya001/'$(whoami)'/g' .zshrc;ok | ||
|
||
echo $0 | grep zsh > /dev/null 2>&1 | true | ||
if [[ ${PIPESTATUS[0]} != 0 ]]; then | ||
running "changing your login shell to zsh" | ||
chsh -s $(which zsh);ok | ||
else | ||
bot "looks like you are already using zsh. woot!" | ||
fi | ||
|
||
#export DOTFILESDIRRELATIVETOHOME=$PWD | ||
export DOTFILESDIRRELATIVETOHOME=.dotfiles | ||
pushd ~ > /dev/null 2>&1 | ||
|