Add git, hostname, locale and user setup scripts

main
Ian Mancini 5 years ago
parent 844bb53f02
commit f84ecc3506

@ -0,0 +1,7 @@
#!/bin/sh
set -Eeuo pipefail
git config --global user.name "Ian Mancini"
git config --global user.email ianmethyst@gmail.com
git config --global core.editor nvim

@ -0,0 +1,21 @@
#!/bin/sh
set -Eeo pipefail
if (( $EUID != 0 )); then
echo "Should be run as root"
exit 1
fi
if [ -z "$1" ]
then
echo "Usage: $(basename $0) hostname"
fi
echo $1 > /etc/hostname
cat >> /etc/hosts <<EOF
127.0.0.1 localhost
::1 localhost
127.0.1.1 $1.localdomain $1
EOF

@ -0,0 +1,12 @@
#!/bin/sh
set -Eeuo pipefail
if (( $EUID != 0 )); then
echo "Should be run as root"
exit 1
fi
sed -i '/^#en_US.UTF-8 UTF-8/s/^#//g' /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf

@ -0,0 +1,11 @@
#!/bin/sh
set -Eeuo pipefail
if (( $EUID != 0 )); then
echo "Should be run as root"
exit 1
fi
useradd -m -G wheel -s '/usr/bin/zsh' ianmethyst
sed -i '/^# %wheel ALL=(ALL) ALL/s/^# //g' /etc/sudoers
Loading…
Cancel
Save