-
Notifications
You must be signed in to change notification settings - Fork 1
/
InstallMe.new
119 lines (100 loc) · 2.73 KB
/
InstallMe.new
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/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" -eq "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 "$B" ]; then
echo "Yes!";
else
echo "No, so I am creating it.";
mkdir $B
fi
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
fi
if [ ! -f ./CONFIG ]; then
echo "Please type [1mmake config[0m first.";
exit;
fi
@echo
@echo
@echo " the fonter binary location : `head -n 1 CONFIG`"
@echo " the font directory : `tail -n 1 CONFIG`"
@echo
@echo "Just type [1mmake install[0m to install into the dirs above."
@echo "If you would like to change the configuration, type [1mmake config[0m."
@echo "Please note that you can change these by editing the Makefile"
@echo "NOTE: You may type [1mmake uninstall[0m to erase $(LNAME)"
config:
@./get-dirs $(FONTS) $(BIN) $(LNAME)
fonts:
@echo "This command will go out into the internet and gather a lot more"
@echo "fonts for fonter."
clean:
@if [ -e ./fonter ]; then rm ./fonter; fi
@if [ -e ./fonter.o ]; then rm ./fonter.o; fi
@if [ -e ./CONFIG ]; then rm ./CONFIG; fi
@echo "Fonter directory is now cleaned up..."
uninstall:
@if [ clear ]; then clear; fi
/bin/rm -f /opt/warpager/ansi/mainmenu.ans
/bin/rm -f /opt/warpager/ansi/normalpage.ans
/bin/rm -f /opt/warpager/ansi/manynumbers.ans
/bin/rm -f /opt/warpager/ansi/pagerwords.ans
/bin/rm -f /opt/warpager/ansi/manypagers.ans
/bin/rm -f /opt/warpager/data.i
/bin/rm -rf /opt/warpager/ansi
/bin/rm -rf /opt/warpager
/bin/rm -f /usr/local/bin/warpager
@echo
@echo "Uninstall is now finished"
@echo
install:
@echo "#################### Now compiling Fonter! ####################"
$(CC) $(CFLAGS) -c $(NAME).c
$(CC) $(CFLAGS) -o $(NAME) $(NAME).o $(LIBS)
strip $(NAME)
@echo "################ Compiling of fonter complete! ################"
time:
@echo "Creating time file..."
@echo "#define COMP \"`date`\"" > inc/compiled.h
tar:
cd .. && tar cf - $(LNAME)/ | gzip -9 > $(LNAME)/$(LNAME).tar.gz