summaryrefslogtreecommitdiffstats
path: root/src/etc/phpshellsessions/gitsync
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/phpshellsessions/gitsync')
-rw-r--r--src/etc/phpshellsessions/gitsync16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/etc/phpshellsessions/gitsync b/src/etc/phpshellsessions/gitsync
index aced804..6757848 100644
--- a/src/etc/phpshellsessions/gitsync
+++ b/src/etc/phpshellsessions/gitsync
@@ -20,11 +20,7 @@ $GITSYNC_MERGE = "/root/.gitsync_merge";
/* NOTE: Set branches here */
$branches = array(
- "master" => "2.2 development branch",
- "RELENG_2_2" => "2.2.* release branch",
- "RELENG_2_1" => "2.1.* release branch",
- "RELENG_2_0" => "2.0.* release branch",
- "RELENG_1_2" => "1.2.* release branch",
+ "master" => "2.3 development branch",
"build_commit" => "The commit originally used to build the image"
);
@@ -40,8 +36,8 @@ if (is_array($command_split)) {
$valid_args = array(
"--minimal" => "\tPerform a minimal copy of only the updated files.\n" .
- "\tNot recommended if the system has files modified by any method other\n" .
- "\tthan gitsync.\n",
+ "\tNot recommended if the system has files modified by any method other\n" .
+ "\tthan gitsync.\n",
"--help" => "\tDisplay this help list.\n"
);
$args = array();
@@ -267,7 +263,7 @@ if (is_dir("$CODIR/pfSenseGITREPO/pfSenseGITREPO")) {
echo "===> Fetching updates...\n";
exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && {$GIT_BIN} config remote.origin.url " . escapeshellarg($GIT_REPO));
exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && {$GIT_BIN} fetch");
- exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && {$GIT_BIN} clean -f -f -x -d");
+ exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && {$GIT_BIN} clean -f -x -d");
run_cmds($git_cmd);
} else {
exec("mkdir -p $CODIR/pfSenseGITREPO");
@@ -300,9 +296,9 @@ if (isset($args["--minimal"])) {
} else if (file_exists("/etc/version.lastcommit")) {
$old_revision = trim(file_get_contents("/etc/version.lastcommit"));
}
- $files_to_copy = strtr(shell_exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && {$GIT_BIN} diff --name-only " . escapeshellarg($old_revision)), "\n", " ");
+ $files_to_copy = strtr(shell_exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && {$GIT_BIN} diff --name-only --relative=src " . escapeshellarg($old_revision)), "\n", " ");
} else {
- $files_to_copy = '--exclude .git .';
+ $files_to_copy = '-C ./src .';
}
// Save new commit ID for later minimal file copies
OpenPOWER on IntegriCloud