+sub update_svn($$) {
+ my $name = shift;
+ my $src = shift;
+
+ if (-d "./feeds/$name/.svn" ) {
+ system("(cd \"./feeds/$name\"; svn up)") == 0 or return 1;
+ } else {
+ system("rm -rf \"./feeds/$name\"");
+ system("svn co $src \"./feeds/$name\"") == 0 or return 1;
+ }
+ return update_index($name, $src);
+}
+
+sub update_cpy($$) {
+ my $name = shift;
+ my $src = shift;
+
+ system("cp -Rf $src ./feeds/$name");
+ return update_index($name, $src);
+}
+
+sub update_link($$) {
+ my $name = shift;
+ my $src = abs_path(shift);
+
+ system("ln -sf $src ./feeds/$name");
+ return update_index($name, $src);
+}
+
+sub update_git($$) {
+ my $name = shift;
+ my $src = shift;
+
+ if (-d "./feeds/$name/.git" ) {
+ system("GIT_DIR=./feeds/$name/.git git pull") == 0 or return 1;
+ } else {
+ system("rm -rf \"./feeds/$name\"");
+ system("git-clone --depth 1 $src ./feeds/$name") == 0 or return 1;
+ }
+ return update_index($name, $src);
+}
+