Last active
August 15, 2018 18:31
-
-
Save jasonmorganson/4733446 to your computer and use it in GitHub Desktop.
User configuration
This file contains hidden or 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
#!/usr/bin/env sh | |
# | |
# | |
# Run with the following command: | |
# | |
# | |
# wget -q -O - https://gist.github.com/jasonmorganson/4733446/raw/user.sh | sh | |
# wget -q -O - http://user.morganson.net | sh | |
USER=jasonmorganson | |
USERHOME=/home/$USER | |
# Create user | |
sudo useradd -G sudo -s /bin/zsh -m -d $USERHOME $USER | |
echo "" | |
echo "Setup user profile for $USER in $USERHOME" | |
echo "" | |
# Setup dotfiles | |
if [ ! -d "$USERHOME/.dotfiles" ]]; then | |
echo -n "Getting dotfiles... " | |
sudo -u $USER git clone https://github.com/jasonmorganson/dotfiles.git $USERHOME/.dotfiles | |
sudo -u $USER cp $USERHOME/.dotfiles/.* $USERHOME | |
echo "done." | |
fi | |
echo "" | |
echo "All done." | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment