forked from andresaquino/monopse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
33 lines (26 loc) · 870 Bytes
/
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
#!/bin/sh
# vim: set ts=2 sw=2 sts=2 si ai et:
# install.sh
# =-=
#
# Developer
# Andres Aquino <aquino(at)hp.com>
#
echo "[1] - Creating structure..."
mkdir -p ~/manuals/man1
echo "[2] - Migrating all config files to new version..."
[ -d ~/monopse ] && cp -rp ~/monopse/setup/*.conf ~/monopse.git/setup/
[ -d ~/monopse ] && cp -rp ~/monopse/monopserc ~/monopse.git/
echo "[3] - Switching to new version..."
cd ~
[ -d ~/monopse.old ] && rm -fr ~/monopse.old
[ -d ~/monopse ] && mv ~/monopse ~/monopse.old
[ -d ~/monopse.git ] && mv ~/monopse.git ~/monopse
echo "[4] - Installing unix documentation..."
cp ~/monopse/man1/monopse.1 ~/manuals/man1/
ln -sf ~/monopse/monopserc ~/.monopserc
ln -sf ~/monopse/monopse.sh ~/monopse/monopse
echo "[5] - Fixing permissiont..."
chmod 0640 ~/monopse/install.sh
chmod 0750 ~/monopse/monopse.sh
echo "[*] - That's all..."