diff options
Diffstat (limited to 'etc/phpshellsessions')
-rw-r--r-- | etc/phpshellsessions/gitsync | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync index aaca2c7..d0be7a1 100644 --- a/etc/phpshellsessions/gitsync +++ b/etc/phpshellsessions/gitsync @@ -29,7 +29,10 @@ if(!file_exists("/usr/local/bin/git")) { echo "Cannot find git, fetching..."; if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) { $pkgtmpdir = "/usr/bin/env PKG_TMPDIR=/root/ "; - $pkgstaging = "-t /root/tmp/instmp.XXXXXX"; + $pkgstagingdir = "/root/tmp"; + if (!is_dir($pkgstagingdir)) + mkdir($pkgstagingdir); + $pkgstaging = "-t {$pkgstagingdir}/instmp.XXXXXX"; } system("{$pkgtmpdir}/usr/sbin/pkg_add {$pkgstaging} -r git"); } |