-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·54 lines (46 loc) · 2.04 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env sh
###########################################################################
# Make sure the user really wants to run this script.
###########################################################################
echo "#############################################################"
echo "# Write 'yes' to really copy octaspire OpenBSD configuration."
echo "# Write something else to quit. This script will OVERWRITE"
echo "# any existing files and WILL COPY SOME FILES USING SUDO. "
echo "# Read the script and make sure it is OK, before running."
echo "#############################################################"
read answer
case "$answer" in
yes ) echo "Starting to copy";;
* ) exit;;
esac
###########################################################################
# Install new font. Installed fonts can be listed with command "fc-list".
# Make also sure that the installation of the font succeeded.
###########################################################################
echo "Installing font"
if [ ! -d "$HOME/.fonts" ]; then
mkdir "$HOME/.fonts"
fi
cp AnonymousPro/Anonymous_Pro.ttf "$HOME/.fonts"
fc-cache # update fonts
fc-list -q "Anonymous Pro"
rc=$?; if [[ $rc != 0 ]]; then echo "Font installation failed"; exit $rc; fi
###########################################################################
# Copy dotfiles into home directory.
###########################################################################
echo "Copying dotfiles into $HOME"
cp .kshrc "$HOME"
cp .profile "$HOME"
cp .inputrc "$HOME"
cp .Xdefaults "$HOME"
cp .Xresources "$HOME"
cp .xinitrc "$HOME"
cp .xsession "$HOME"
###########################################################################
# Copy wsconsctl.conf, doas.conf and rc.conf.local into /etc using sudo
###########################################################################
echo "Copying wsconsctl.conf, doas.conf and rc.conf.local into /etc using sudo"
sudo cp wsconsctl.conf /etc
sudo cp doas.conf /etc
sudo cp rc.conf.local /etc
sudo -k # Invalidate possibly cached credentials