-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·49 lines (40 loc) · 934 Bytes
/
install.sh
File metadata and controls
executable file
·49 lines (40 loc) · 934 Bytes
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
#!/bin/sh
#
# NAME: funTras
# VER: 2021.03
# PLAT: linux-64
# LINES: 42
if ! [ -x "$(command -v git)" ]; then
echo 'Error: g++ is not installed.' >&2
echo 'Installing g++ ...' >&2
sudo apt-get install g++
else
echo '[OK] g++ already installed.'
fi
cd FunTras
BUILD=./build
if [ ! -d "$BUILD" ]; then
mkdir build
echo '[OK] $BUILD directory created'
else
echo '[OK] $BUILD exists on filesystem'
fi
LIB=./lib
if [ ! -d "$BUILD" ]; then
mkdir lib
echo '[OK] $LIB directory created'
else
echo '[OK] $LIB exists on filesystem'
fi
# Agregar funtras.hpp
FILE=/usr/include/funtras.hpp
if [ -f "$FILE" ]; then
echo "[OK] $FILE exists"
sudo rm /usr/include/funtras.hpp
fi
sudo cp ./src/funtras.hpp /usr/include
echo "[OK] $FILE stored and updated".
# Compilar y crear biblioteca
g++ -Werror -c ./src/funtras.cpp -o ./build/funtras.o
ar cr ./lib/libfuntras.a ./build/funtras.o
exit 0