moved for svn-git switch
[mailer.git] / updater / cvs-updater.sh
1 #!/bin/sh
2 # Enable/Disable sub systems
3 FTP_ENABLE="yes"        # yes/no
4 CVS_ENABLE="auto"       # auto/yes/no
5
6 # Initialization
7 echo -n "Init... "
8 . ./.config.sh
9 echo -n "."
10 . ./.cms.sh
11 echo -n "."
12 . ./.cmds.sh
13 echo -n "."
14 . ./.hp.sh
15 echo -n "."
16 . ./.ftp.sh
17 echo -n "."
18 . ./.functions.sh
19 echo -n "."
20 . ./.extensions.sh
21 echo -n "."
22 . ./.themes.sh
23 echo " done"
24
25 if test "$FTP_ENABLE" = "yes"; then
26         if test ! "$UPLOAD_EXT" = ""; then
27                 # Initialize FTP system
28                 ftp_init
29          else
30                 if test ! "$UPLOAD_CMS_EXT" = ""; then
31                         # Initialize FTP system
32                         ftp_init
33                  else
34                         if test ! "$UPLOAD_HP_EXT" = ""; then
35                                 # Initialize FTP system
36                                 ftp_init
37                          else
38                                 if test ! "$UPLOAD_THEMES" = ""; then
39                                         # Initialize FTP system
40                                         ftp_init
41                                  else
42                                         # Disbale FTP upload
43                                         FTP_ENABLE="no"
44                                 fi
45                         fi
46                 fi
47         fi
48 fi
49
50 # Create missing dirs, copy/move files
51 init_file_system
52
53 # Update CVS server
54 if test "$1" == "-d"; then
55         cvs_download
56  else
57         if test "$1" == "-s"; then
58                 stats_upload
59          else
60                 if test "$CVS" == "yes"; then
61                         cvs_update
62                 fi
63         fi
64 fi
65
66 # Remove files
67 remove_files
68
69 # Create theme archivs
70 zip_themes
71
72 # Create debug extensions first
73 zip_debug_ext
74
75 # Create command archives
76 zip_cmds
77
78 # Create Complete, Medium and Max archives
79 zip_packages
80
81 # Create extension archives
82 zip_extensions
83 zip_cms_extensions
84 zip_hp_extensions
85
86 # Create base theme archivs
87 zip_base_themes
88
89 # Create main archives
90 zip_base_archives
91
92 # Upload
93 if test "$FTP_ENABLE" = "yes"; then
94         if test ! "$UPLOAD_EXT" = ""; then
95                 ftp_upload
96         fi
97         if test ! "$UPLOAD_CMS_EXT" = ""; then
98                 cms_ftp_upload
99         fi
100         if test ! "$UPLOAD_HP_EXT" = ""; then
101                 hp_ftp_upload
102         fi
103         if test ! "$UPLOAD_THEMES" = ""; then
104                 themes_ftp_upload
105         fi
106 fi
107
108 echo
109 echo "All done! Bye..."
110 echo