diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-09 17:19:30 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-09 17:19:30 +0200 |
commit | d73f803ed217535b6753edd3057e03deae07b1f9 (patch) | |
tree | 0a972b4fb027f9a18a328fb169ddc6977a66e4e5 | |
parent | Less fucked up (diff) | |
download | joe-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-x | src/update/gitjoe.pl | 25 |
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', |