aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/update/gitjoe.pl13
-rwxr-xr-xsrc/update/vps.pl28
2 files changed, 25 insertions, 16 deletions
diff --git a/src/update/gitjoe.pl b/src/update/gitjoe.pl
index 0949164..86d1df3 100755
--- a/src/update/gitjoe.pl
+++ b/src/update/gitjoe.pl
@@ -28,9 +28,9 @@ sub stagit_generate {
my $home_dir = '/usr/home/' . $user . '/';
chdir($site_dir);
system(
- '/usr/local/bin/dash',
- '-c',
- '/bin/rm -rf ' . $user . '/'
+ '/bin/rm',
+ '-rf',
+ $user . '/'
);
mkdir($user . '/', 0755);
my $i = 0;
@@ -46,9 +46,8 @@ sub stagit_generate {
$repos[$i] = $repos[$i] . '.git';
print "Indexing " . colored($user . '/' . $repos[$i], 'bold') . ".\n";
system(
- '/usr/local/bin/dash',
- '-c',
- '/usr/local/bin/stagit ' . $home_dir . $repos[$i] . '/'
+ '/usr/local/bin/stagit',
+ $home_dir . $repos[$i] . '/'
);
copy('../style.css', './style.css');
copy('../logo.png', './logo.png');
@@ -58,7 +57,7 @@ sub stagit_generate {
system(
'/usr/local/bin/dash',
'-c',
- '/usr/local/bin/stagit-index ' . $repos_line . '> index.html'
+ '/usr/local/bin/stagit-index ' . $repos_line . '>index.html'
);
system(
'/usr/local/bin/dash',
diff --git a/src/update/vps.pl b/src/update/vps.pl
index a57344e..3d45e06 100755
--- a/src/update/vps.pl
+++ b/src/update/vps.pl
@@ -3,22 +3,32 @@
use strict;
use warnings;
use Term::ANSIColor;
+use constant GIT_PATH => '/usr/local/bin/git';
sub main {
system(
- '/usr/local/bin/dash',
- '-c',
- 'git -C /usr/local/www/jozan pull origin master >/dev/null 2>&1'
+ GIT_PATH,
+ '-C',
+ '/usr/local/www/jozan',
+ 'pull',
+ 'origin',
+ 'master'
);
system(
- '/usr/local/bin/dash',
- '-c',
- 'git -C /usr/local/www/gitjoe pull origin master >/dev/null 2>&1'
+ GIT_PATH,
+ '-C',
+ '/usr/local/www/gitjoe',
+ 'pull',
+ 'origin',
+ 'master'
);
system(
- '/usr/local/bin/dash',
- '-c',
- 'git -C /root/scripts pull origin master >/dev/null 2>&1'
+ GIT_PATH,
+ '-C',
+ '/root/scripts',
+ 'pull',
+ 'origin',
+ 'master'
);
print "Updated jozan website, git website and scripts.\n";
exit;