-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInstallMe
More file actions
103 lines (89 loc) · 2.16 KB
/
InstallMe
File metadata and controls
103 lines (89 loc) · 2.16 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/sh
#
# Script for installing Fonter
#
if [ $# -ne 1 ]; then
echo "This program is not intended for external use."
echo "Please type make."
exit
fi
#Change what you want below
#Compiler
CC="gcc"
#CC="cc"
#Compile options and libraries
CFLAGS="-s -O6 -DLINUX -DNCURSES"
#CFLAGS="-s -O -g -Wall -DLINUX -DNCURSES"
LIBS="-lncurses"
NAME="fonter"
LNAME="fonter-1.8"
# DO NOT CHANGE ANYTHING BELOW THIS LINE.
FONTS="/usr/local/fonterfonts"
BIN="/usr/local/bin"
if [ "$1" = "CONFIG" ]; then
echo "Welcome to the [1m$LNAME[0m installation program."
echo -n "What path do you want the fonter bin in [$BIN]: "
read A
if [ "$A" = "" ]; then
A=$BIN;
fi
echo -n "What path do you want the fonts in [$FONTS]: "
read B
if [ "$B" = "" ]; then
B=$FONTS;
fi
`echo $A > CONFIG`
`echo $B >> CONFIG`
echo -n "Does [1m$A[0m exist...";
if [ -d "$A" ]; then
echo "Yes!";
else
echo "No, so I am creating it.";
mkdir $A
fi
echo -n "Does [1m$B[0m exist...";
if [ -d "$B" ]; then
echo "Yes!"
else
echo "No, so I am creating it.";
mkdir $B
fi
echo
echo "Configuration is now complete. If you wish to install fonter,"
echo "please type [1mmake install[0m. Remember. Fonter will"
echo "uninstall just fine, if you specify the same dirs upon installing"
echo "when your erasing it. Run [1mmake uninstall[0m to erase fonter."
echo
exit
fi
if [ ! -f ./CONFIG ]; then
echo "Please type [1mmake config[0m first.";
exit;
fi
if [ "$1" = "TIME" ]; then
echo "Creating time file..."
echo "#define COMP \"`date`\"" > inc/compiled.h
fi
if [ "$1" = "INSTALL" ]; then
FONTS=`tail -n 1 CONFIG`
BIN=`head -n 1 CONFIG`
echo
echo
echo " the fonter binary location : $BIN"
echo " the fonts directory : $FONTS"
echo
echo -n "If the settings are correct, please type [1myes[0m: "
read A
if [ "$A" != "yes" ]; then
echo "You didn't type 'yes', so I am assuming you don't want to continue."
exit
fi
echo "#define FONTDIR \"$FONTS/\"" > inc/fontdir.h
echo "#################### Now compiling Fonter! ####################"
$CC $CFLAGS -c $NAME.c
$CC $CFLAGS -o $NAME $NAME.o $LIBS
strip $NAME
echo "################ Compiling of fonter complete! ################"
cp fonter $BIN
cp -a fonts/* $FONTS
fi