blob: d4c7b79ee7c0a8354478a3508d1d736502687609 (
plain)
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
#!/bin/sh
# 20181224
# Edit and uncomment the following lines if necessary
texpath=/usr/share/texlive
texbinpath=/usr/bin
kettex=0
if [ ${kettex} -eq 0 ]; then
texpath=/opt/kettex/texlive
texbinpath=/opt/kettex/texlive/bin/x86_64-linux
fi
#ketsrc=~/Desktop/ketcindyfolder
cindyplug=/usr/local/cinderella/Plugins
homehead=/home
ketcindyscripts=${texpath}/texmf-dist/scripts/ketcindy
ketcindydoc=${texpath}/texmf-dist/doc/support/ketcindy
ketcindystyle=${texpath}/texmf-dist/tex/latex/ketcindy
cd `dirname $0`
if [ -e ../ketcindyfolder ]; then
cd ../ketcindyfolder
fi
echo texpath=${texpath}
echo texbinpath=${texbinpath}
echo cinderella plugin=${cindyplug}
echo home=${homehead}
read -p 'Are the above paths OK? (y/n) : ' ans
if [ ${ans} = "n" ]; then
echo Edit paths
sleep 2
exit 0
fi
echo copying scripts
sudo cp -r -p -T scripts/ ${ketcindyscripts}/
if [ $? -gt 0 ]; then
echo Error $?
sleep 5
else
echo "scripts copied to "${ketcindyscripts}
fi
sudo cp -r -p doc/ ${ketcindydoc}/
if [ $? -gt 0 ]; then
echo Error $?
sleep 5
else
echo "doc copied to "${ketcindydoc}
fi
sudo cp -r -p style/ ${ketcindystyle}/
if [ $? -gt 0 ]; then
echo Error $?
sleep 5
else
echo "styles copied to "${ketcindystyle}
sudo ${texbinpath}/mktexlsr
fi
cd ${cindyplug}
if [ -e KetCindyPlugin.jar ]; then
sudo rm KetCindyPlugin.jar
fi
cd ${ketcindyscripts}
sudo cp -p ketjava/KetCindyPlugin.jar ${cindyplug}
echo "KetCindyPlugin.jar copied to Cinderella"
# 20190616from
cd ${cindyplug}
remake="y"
if [ -e ketcindy.ini ]; then
echo "Contentes of ketcindy.ini : "
echo ""
cat ketcindy.ini
echo ""
read -p 'Do you want to remake ketcindy.ini? (y/n) : ' remake
fi
if [ ${remake} = "y" ]; then
echo "ketcindy.ini will be made"
else
echo "finished"
sleep 1
exit 0
fi
# 20190616to
if [ -e ketcindy.ini ]; then
sudo rm ketcindy.ini
fi
echo "PathThead=\"${texbinpath}/\";" > ketcindy.ini
echo "Dirhead=\"${ketcindyscripts}\";" >> ketcindy.ini
echo "Homehead=\"${homehead}\";" >> ketcindy.ini
echo "setdirectory(Dirhead);" >> ketcindy.ini
echo "import(\"setketcindy.txt\");" >> ketcindy.ini
#191224from
read -p 'Language for Help (j/e) : ' lang
echo "Langhelp=\"${lang}\";" >> ketcindy.ini
#191224upto
echo "import(\"ketoutset.txt\");" >> ketcindy.ini
echo "Choose TeX with the 1st(+2nd) character"
read -p 'p=platex, u=uplatex, l=latex, x=xelatex, pd=pdflatex, lu=lualatex:' tex
if [ ${tex} = "p" ]; then
tex="platex"
fi
if [ ${tex} = "u" ]; then
tex="uplatex"
fi
if [ ${tex} = "l" ]; then
tex="latex"
fi
if [ ${tex} = "x" ]; then
tex="xelatex"
fi
if [ ${tex} = "pd" ]; then
tex="pdflatex"
fi
if [ ${tex} = "lu" ]; then
tex="lualatex"
fi
echo "PathT=PathThead+\"${tex}\";" >> ketcindy.ini
read -p 'Number of default graphics (1=tpic, 2=pict2e, 3=tikz) : ' num
if [ ${num} = "1" ]; then
gc="tpic"
fi
if [ ${num} = "2" ]; then
gc="pict2e"
fi
if [ ${num} = "3" ]; then
gc="tikz"
fi
echo "Usegraphics(\"${gc}\");" >> ketcindy.ini
read -p 'PDF viewer (ex) evince : ' pathpdf
echo "Pathpdf=\"${pathpdf}\";" >> ketcindy.ini
echo "Mackc=\"bash\";" >> ketcindy.ini
echo "ketcindy.ini generated(updated)"
sleep 1
exit 0
|