aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-07-09 17:19:30 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-07-09 17:19:30 +0200
commitd73f803ed217535b6753edd3057e03deae07b1f9 (patch)
tree0a972b4fb027f9a18a328fb169ddc6977a66e4e5
parentLess fucked up (diff)
downloadjoe-scripts-d73f803ed217535b6753edd3057e03deae07b1f9.tar.gz
joe-scripts-d73f803ed217535b6753edd3057e03deae07b1f9.tar.bz2
joe-scripts-d73f803ed217535b6753edd3057e03deae07b1f9.tar.xz
joe-scripts-d73f803ed217535b6753edd3057e03deae07b1f9.tar.zst
joe-scripts-d73f803ed217535b6753edd3057e03deae07b1f9.zip
Trying without rm everything
-rwxr-xr-xsrc/update/gitjoe.pl25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/update/gitjoe.pl b/src/update/gitjoe.pl
index 67bfd82..3a19f5b 100755
--- a/src/update/gitjoe.pl
+++ b/src/update/gitjoe.pl
@@ -27,12 +27,14 @@ sub stagit_generate {
my $site_dir = '/usr/local/www/git-jozan/';
my $home_dir = '/usr/home/' . $user . '/';
chdir($site_dir);
- system(
- '/usr/local/bin/dash',
- '-c',
- '/bin/rm -rf ' . $user . '/'
- );
- mkdir($user, 0755);
+ # system(
+ # '/usr/local/bin/dash',
+ # '-c',
+ # '/bin/rm -rf ' . $user . '/'
+ # );
+ if (!(-e $user . '/')) {
+ mkdir($user . '/', 0755);
+ }
my $i = 0;
my $repos_line = "";
copy('./css/gitjoe.css', './' . $user . '/style.css');
@@ -41,16 +43,11 @@ sub stagit_generate {
chdir($site_dir . $user . '/');
$repos_line = $repos_line . ' ' . $home_dir . $repos[$i] . '/';
substr($repos[$i], -4) = "";
- mkdir($repos[$i], 0755);
+ if (!(-e $repos[$i] . '/')) {
+ mkdir($repos[$i] . '/', 0755);
+ }
chdir($site_dir . $user . '/' . $repos[$i] . '/');
$repos[$i] = $repos[$i] . '.git';
- mkdir($site_dir . 'cache/' . $user . '/', 0755);
- print "Repoing " . $repos[$i] . "\n";
- system(
- '/usr/local/bin/dash',
- '-c',
- '/usr/bin/touch ' . $site_dir . $user . '/' . $repos[$i] . '.cache'
- );
system(
'/usr/local/bin/dash',
'-c',