diff options
author | b4rkod <void@Asena.localdomain> | 2023-11-12 23:08:00 +0300 |
---|---|---|
committer | b4rkod <void@Asena.localdomain> | 2023-11-12 23:08:00 +0300 |
commit | 19bd1af357e9c16a3b666cd860a1b8b17330c652 (patch) | |
tree | 11febbef3bb410346ff5dd5fc5706cfbad697348 /add_to_index.sh |
git started
Diffstat (limited to 'add_to_index.sh')
-rwxr-xr-x | add_to_index.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/add_to_index.sh b/add_to_index.sh new file mode 100755 index 0000000..dacdf35 --- /dev/null +++ b/add_to_index.sh @@ -0,0 +1,7 @@ +#!/bin/sh +cd $HOME/www/blogposts +FILE=$(basename $1|sed s/.txt/.html/) +echo $FILE +/home/void/www/sh/formatter.sh /home/void/www/blogposts/$(basename $1) >| "$HOME/www/source/$FILE" +sed -i "/\<ul name=blogposts\>/s/$/\n\t\<li\>\<a href=\"$FILE\"\>$FILE\<\/a\>\<\/li\>/" $HOME/www/source/index.html + |