forked from Labomc/libxplaces
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstallScript
More file actions
executable file
·53 lines (43 loc) · 1.05 KB
/
installScript
File metadata and controls
executable file
·53 lines (43 loc) · 1.05 KB
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
#!/bin/bash
echo "Installing xplaces..."
rootHeaderInstall="/usr/include/xplaces/"
rootBinariesInstall="/usr/lib/xplaces/"
if [ -d $rootHeaderInstall ]; then
echo "Removing old header installation path..."
rm -rf $rootHeaderInstall
else
echo "Ready to Install headers..."
fi
if [ -d $rootBinariesInstall ]; then
echo "Removing old header binaries path..."
rm -rf $rootBinariesInstall
else
echo "Ready to Install binaries..."
fi
echo "Creating directories..."
mkdir /usr/include/xplaces
mkdir /usr/include/xplaces/udp
mkdir /usr/include/xplaces/webserver
mkdir /usr/lib/xplaces
echo "Copying headers..."
cd src/
cp *.h /usr/include/xplaces
cd udp/
cp *.h /usr/include/xplaces/udp
cd ../webserver/
cp *.h /usr/include/xplaces/webserver
cd ..
cd ..
echo "Copying binaries..."
cd Release/
cp *.so /usr/lib/xplaces
echo "Exporting libraries..."
pathToLd="/etc/ld.so.conf.d/xplaces.conf"
if [ -d $pathToLd ]; then
echo "Removing old ld configuration path..."
rm $pathToLd
else
echo "Ready to config ld..."
fi
echo $rootBinariesInstall > $pathToLd
ldconfig