~cairo-dock-team/cairo-dock-plug-ins/gmenu-preload-thread

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
#!/bin/sh

read -p "Enter applet's name : " AppletName
if test -e $AppletName; then
	echo "Directory $AppletName already exists here; delete it before."
	exit 1
fi
export LibName=`echo $AppletName | tr -- - _`
read -p "Enter your name : " MyName
read -p "Enter an e-mail adress to contact you for bugs or congratulations : " MyMail
read -p "Enter the default label of your applet (Just type enter to leave it empty for the moment) :" AppletLabel
read -p "Enter the default icon of your applet (Just type enter if you'll draw it dynamically, for exemple like the 'clock' or the 'dustbin' applet) :" AppletIcon


echo "creation de l'arborescence de l'applet $AppletName ..."
cp -r template $AppletName
find $AppletName -name ".svn" -execdir rm -rf .svn \; > /dev/null


cd $AppletName
sed "s/CD_APPLET_NAME/$AppletName/g" configure.ac > tmp
sed "s/CD_MY_NAME/$MyName/g" tmp > configure.ac
sed "s/CD_MY_MAIL/$MyMail/g" configure.ac > tmp
mv tmp configure.ac


cd data
if test "x$AppletLabel" = "x"; then
	sed "s/CD_APPLET_LABEL/$AppletName/g" template.conf.in > tmp
else
	sed "s/CD_APPLET_LABEL/$AppletLabel/g" template.conf.in > tmp
fi
if test "$AppletIcon" = "x"; then
	sed "/CD_APPLET_ICON/d" tmp > template.conf.in
else
	sed "s/CD_APPLET_ICON/$AppletIcon/g" tmp > template.conf.in
fi
mv template.conf.in "$AppletName.conf.in"

sed "s/CD_APPLET_NAME/$AppletName/g" readme.in > tmp
sed "s/CD_MY_NAME/$MyName/g" tmp > readme.in

sed "s/CD_APPLET_NAME/$AppletName/g" Makefile.am > tmp
mv tmp Makefile.am
rm -f tmp


cd ../src
sed "s/CD_APPLET_NAME/$AppletName/g" Makefile.am > tmp
sed "s/CD_LIB_NAME/$LibName/g" tmp > Makefile.am

sed "s/CD_APPLET_NAME/$AppletName/g" applet-init.c > tmp
mv tmp applet-init.c

sed "s/CD_APPLET_NAME/$AppletName/g" applet-notifications.c > tmp
sed "s/CD_MY_NAME/$MyName/g" tmp > applet-notifications.c
rm -f tmp


cd ../po
sed "s/CD_APPLET_NAME/$AppletName/g" fr.po > tmp
sed "s/CD_MY_NAME/$MyName/g" tmp > fr.po
rm -f tmp


cd ..

autoreconf -isvf && ./configure --prefix=/usr --enable-glitz && make

echo "now it's your turn ! type sudo make install to install it."