diff options
author | Scott Ullrich <sullrich@sullrich-MacBookPro.local> | 2009-03-12 23:55:43 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@sullrich-MacBookPro.local> | 2009-03-12 23:55:43 -0400 |
commit | 6ca212bb5840db1e7947d5c62d27c8dbaa6f3a92 (patch) | |
tree | f3624269f20ad9e7a63c2295a26d92cf1a63f494 | |
parent | 563c9ca98cae7643213c4e9e1286b3c57c68705a (diff) | |
download | pfsense-6ca212bb5840db1e7947d5c62d27c8dbaa6f3a92.zip pfsense-6ca212bb5840db1e7947d5c62d27c8dbaa6f3a92.tar.gz |
Sync
-rw-r--r-- | etc/phpshellsessions/cvssync | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/etc/phpshellsessions/cvssync b/etc/phpshellsessions/cvssync index b1a7f84..461811f 100644 --- a/etc/phpshellsessions/cvssync +++ b/etc/phpshellsessions/cvssync @@ -4,18 +4,20 @@ * Part of the pfSense project pfSsh.php subsystem */ +exec("rm -rf /home/pfsense /root/pfsense /pfSenseGITREPO/"); + $GIT_REPO="http://gitweb.pfsense.org/pfsense/mainline.git"; +$CODIR = "/root/pfsense/"; global $argv; global $command_split; conf_mount_rw(); -if(is_dir("/home/pfsense")) { - echo "\nRemoving downloaded cvssync data, please wait..."; - exec("rm -rf /home/pfsense"); - echo " done.\n"; -} +echo "\nRemoving downloaded cvssync data, please wait..."; +exec("/bin/rm -rf /home/pfsense"); +exec("mkdir -p /home/pfsense"); +echo " done.\n"; unlink_if_exists("/tmp/config.cache"); @@ -68,12 +70,6 @@ if($argv[4] == "NOBACKUP") else $nobackup = false; -$CODIR = "/root/pfsense/"; - -// XXX Temporary until we get git under control. -if(is_dir("$CODIR/pfSenseGITREPO")) - exec("rm -rf $CODIR/pfSenseGITREPO"); - exec("mkdir -p /root/pfsense/$BRANCHTAG"); $found = false; @@ -126,7 +122,7 @@ if(is_dir("$CODIR/pfSenseGITREPO")) { } if($branch == "master") { - exec("cd $CODIR/pfSenseGITREPO && git checkout master"); + exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git checkout master"); } else { $current_branch=`git branch | grep $branch`; if($current_branch == "") { |