aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2022-04-19 08:30:19 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2022-04-19 08:30:19 +0200
commit396e1b14f152ddd83eeed4827a70c253a11e9a05 (patch)
tree37c7f5a0546676da32c64504fd1238e4d9ef6b9a /src
parentREADME.org update (diff)
downloadjoe-scripts-396e1b14f152ddd83eeed4827a70c253a11e9a05.tar.gz
joe-scripts-396e1b14f152ddd83eeed4827a70c253a11e9a05.tar.bz2
joe-scripts-396e1b14f152ddd83eeed4827a70c253a11e9a05.tar.xz
joe-scripts-396e1b14f152ddd83eeed4827a70c253a11e9a05.tar.zst
joe-scripts-396e1b14f152ddd83eeed4827a70c253a11e9a05.zip
Smoother like this, changed url
Diffstat (limited to '')
-rwxr-xr-xsrc/cron/counter.sh4
-rwxr-xr-xsrc/cron/gitjoe.pl2
-rwxr-xr-xsrc/gitjoe/newrepo.pl6
3 files changed, 7 insertions, 5 deletions
diff --git a/src/cron/counter.sh b/src/cron/counter.sh
index f3a7656..f9fc80a 100755
--- a/src/cron/counter.sh
+++ b/src/cron/counter.sh
@@ -5,6 +5,8 @@ destfile='/usr/local/www/jozan/index.html'
foretext='Unique visitors: '
tmp=$(mktemp)
-sed "s/$foretext.*$/$foretext$(awk '{print $1}' $logfile | sort | uniq | wc -l | tr -d ' ')/" $destfile >"$tmp"
+[ -e $logfile ] || exit 1
+[ -e $destfile ] || exit 1
+sed "s/$foretext.*$/$foretext<b>$(awk '{print $1}' $logfile | sort | uniq | wc -l | tr -d ' ')<\/b>/" $destfile >"$tmp" || rm "$tmp"
cat "$tmp" >$destfile
rm "$tmp"
diff --git a/src/cron/gitjoe.pl b/src/cron/gitjoe.pl
index bb668b2..07c8fc4 100755
--- a/src/cron/gitjoe.pl
+++ b/src/cron/gitjoe.pl
@@ -66,7 +66,7 @@ sub stagit_generate {
system(
'/usr/local/bin/dash',
'-c',
- "/usr/local/bin/gsed -i 's/<td><span class=\"desc\">Repositories<\\/span><\\/td>/<td><span class=\"desc\"><h1>" . $user . " - Repositories<\\/h1><\\/span><\\/td><\\/tr><tr><td><\\/td><td>Back to <a href=\"https:\\/\\/git.jozanofastora.xyz\\/\">GitJoe<\\/a><\\/td><\\/tr>/' index.html"
+ "/usr/local/bin/gsed -i 's/<td><span class=\"desc\">Repositories<\\/span><\\/td>/<td><span class=\"desc\"><h1>" . $user . " - Repositories<\\/h1><\\/span><\\/td><\\/tr><tr><td><\\/td><td>Back to <a href=\"https:\\/\\/gitjoe.xyz\\/\">GitJoe<\\/a><\\/td><\\/tr>/' index.html"
);
system(
'/usr/local/bin/dash',
diff --git a/src/gitjoe/newrepo.pl b/src/gitjoe/newrepo.pl
index 308dd36..ea3c46d 100755
--- a/src/gitjoe/newrepo.pl
+++ b/src/gitjoe/newrepo.pl
@@ -51,7 +51,7 @@ sub main
close($owner_fh);
open(my $url_fh, '>:encoding(UTF-8)', $home_dir . $repo . 'url');
substr($repo, -1) = "";
- print $url_fh 'git://jozanofastora.xyz/' . $usr . '/' . $repo;
+ print $url_fh 'git://gitjoe.xyz/' . $usr . '/' . $repo;
close($url_fh);
$repo = $repo . '/';
open(my $desc_fh, '>:encoding(UTF-8)', $home_dir . $repo . 'description');
@@ -65,8 +65,8 @@ sub main
chown $uid, $gid, $home_dir . $repo . 'description';
substr($repo, -1) = "";
print "Created git repository " . colored($repo, 'bold green') . " for user " . colored($usr, 'bold') . ".\n";
- print "Remote url: " . colored($usr . '@jozanofastora.xyz:' . $repo, 'bold green') . "\n"
- . "Public clone url: " . colored('git://jozanofastora.xyz/' . $usr . '/' . $repo, 'bold green') . "\n";
+ print "Remote url: " . colored($usr . '@gitjoe.xyz:' . $repo, 'bold green') . "\n"
+ . "Public clone url: " . colored('git://gitjoe.xyz/' . $usr . '/' . $repo, 'bold green') . "\n";
exit;
}