diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2012-05-20 17:52:38 -0600 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2012-05-20 17:52:38 -0600 |
commit | 612f5198525d80b92eebd9e450b64b23363eee8e (patch) | |
tree | a720242399eeca77b6f419bdf44070be2867ce2c /etc/phpshellsessions | |
parent | c6d0f00b03173bc2410b84d559f38f91e79d15db (diff) | |
download | pfsense-612f5198525d80b92eebd9e450b64b23363eee8e.zip pfsense-612f5198525d80b92eebd9e450b64b23363eee8e.tar.gz |
Modify the tar parameters to exclude .git
Diffstat (limited to 'etc/phpshellsessions')
-rw-r--r-- | etc/phpshellsessions/gitsync | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync index 8f0caac..6bc07e1 100644 --- a/etc/phpshellsessions/gitsync +++ b/etc/phpshellsessions/gitsync @@ -282,17 +282,12 @@ exec("rm -f ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/etc/syslog.conf 2>/dev/null") echo "===> Installing new files...\n"; -// Don't include the .git directory in the copy -exec("mv $CODIR/pfSenseGITREPO/pfSenseGITREPO/.git $CODIR/pfSenseGITREPO/gitsync_temp.git"); - if($g['platform'] == "pfSense") - $command = "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO ; tar -cpf - . | (cd / ; tar -Uxpf -)"; + $command = "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO ; tar -cpf - --exclude .git . | (cd / ; tar -Uxpf -)"; else - $command = "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO ; tar -cpf - . | (cd / ; tar -xpf -) 2>/dev/null"; + $command = "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO ; tar -cpf - --exclude .git . | (cd / ; tar -xpf -) 2>/dev/null"; exec($command); -exec("mv $CODIR/pfSenseGITREPO/gitsync_temp.git $CODIR/pfSenseGITREPO/pfSenseGITREPO/.git"); - // Reset the repository to restore the deleted files exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git reset --hard >/dev/null 2>/dev/null"); |