3
read -p "Enter applet's name : " AppletName
4
if test -e $AppletName; then
5
echo "Directory $AppletName already exists here; delete it before."
8
read -p "Enter your name : " MyName
9
read -p "Enter an e-mail adress to contact you for bugs or congratulations : " MyMail
10
read -p "Enter the default label of your applet (Just type enter to not have a label) :" AppletLabel
11
read -p "Enter the default icon of your applet (Just type enter if you'll draw it dynamically) :" AppletIcon
14
echo "creation de l'arborescence de l'applet $AppletName ..."
15
cp -r template $AppletName
19
sed "s/CD_APPLET_NAME/$AppletName/g" configure.ac > tmp
20
sed "s/CD_MY_NAME/$MyName/g" tmp > configure.ac
21
sed "s/CD_MY_MAIL/$MyMail/g" configure.ac > tmp
26
if test "x$AppletLabel" = "x"; then
27
sed "/CD_APPLET_LABEL/d" template.conf.in > tmp
29
sed "s/CD_APPLET_LABEL/$AppletLabel/g" template.conf.in > tmp
31
if test "$AppletIcon" = "x"; then
32
sed "/CD_APPLET_ICON/d" tmp > template.conf.in
34
sed "s/CD_APPLET_ICON/$AppletIcon/g" tmp > template.conf.in
36
mv template.conf.in "$AppletName.conf.in"
38
sed "s/CD_APPLET_NAME/$AppletName/g" readme > tmp
39
sed "s/CD_MY_NAME/$MyName/g" tmp > readme
41
sed "s/CD_APPLET_NAME/$AppletName/g" Makefile.am > tmp
47
sed "s/CD_APPLET_NAME/$AppletName/g" Makefile.am > tmp
50
sed "s/CD_APPLET_NAME/$AppletName/g" applet-init.c > tmp
53
if test "x$AppletLabel" = "x"; then
54
sed "s/CD_APPLET_LABEL/NULL/g" applet-config.c > tmp
56
sed "s/CD_APPLET_LABEL/\"$AppletLabel\"/g" applet-config.c > tmp
58
if test "x$AppletLabel" = "x"; then
59
sed "s/CD_APPLET_ICON/NULL/g" tmp > applet-config.c
61
sed "s/CD_APPLET_ICON/\"$AppletIcon\"/g" tmp > applet-config.c
64
sed "s/CD_APPLET_NAME/$AppletName/g" applet-notifications.c > tmp
65
sed "s/CD_MY_NAME/$MyName/g" tmp > applet-notifications.c
70
sed "s/CD_APPLET_NAME/$AppletName/g" fr.po > tmp
71
sed "s/CD_MY_NAME/$MyName/g" tmp > fr.po