summaryrefslogtreecommitdiff
path: root/seen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'seen.sh')
-rwxr-xr-xseen.sh51
1 files changed, 33 insertions, 18 deletions
diff --git a/seen.sh b/seen.sh
index 0ecf446..16bc980 100755
--- a/seen.sh
+++ b/seen.sh
@@ -2,7 +2,7 @@
# Seen, a simple static blog generator
#
-# Copyright (C) 2021 Vitali64 <vitali64pmemail@protonmail.com
+# Copyright (C) 2021 Vitali64 <vitali64pmemail@protonmail.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@@ -15,11 +15,13 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
usage() {
- echo "Usage : ./seen [OPTIONS]"
+ echo "Usage : ./seen [OPTIONS]"
echo
- echo "--help : Print this help message"
- echo "--clear : Remove generated blog"
- echo "--rm : Remove everything and start from scratch"
+ echo "--help : Print this help message"
+ echo "--clear : Remove generated blog"
+ echo "--rm : Remove everything and start from scratch"
+ echo "--license : Show license"
+ echo "--rss : Create an RSS feed (runs ./rs.sh)"
}
die() {
@@ -28,19 +30,7 @@ die() {
}
echo "Seen, a simple static blog generator"
-echo " Copyright (C) 2021 Vitali64 <vitali64pmemail@protonmail.com"
-echo " This program is free software: you can redistribute it and/or modify"
-echo " it under the terms of the GNU General Public License as published by"
-echo " the Free Software Foundation, either version 3 of the License, or"
-echo " (at your option) any later version."
-echo
-echo " This program is distributed in the hope that it will be useful,"
-echo " but WITHOUT ANY WARRANTY; without even the implied warranty of"
-echo " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
-echo " GNU General Public License for more details."
-echo
-echo " You should have received a copy of the GNU General Public License"
-echo " along with this program. If not, see <https://www.gnu.org/licenses/>."
+echo
if [ "$1" = "--clear" ]; then
echo "-> [$(date +%R)] Deleting generated blog ..."
@@ -53,6 +43,25 @@ elif [ "$1" = "--rm" ]; then
elif [ "$1" = "--help" ]; then
usage
exit 0
+elif [ "$1" = "--rss" ]; then
+ . "./rs.sh"
+ exit 0
+elif [ "$1" = "--license" ]; then
+ echo "Copyright (C) 2021 Vitali64 <vitali64pmemail@protonmail.com>"
+ echo
+ echo "This program is free software: you can redistribute it and/or modify"
+ echo "it under the terms of the GNU General Public License as published by"
+ echo "the Free Software Foundation, either version 3 of the License, or"
+ echo "(at your option) any later version."
+ echo
+ echo "This program is distributed in the hope that it will be useful,"
+ echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
+ echo "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
+ echo "GNU General Public License for more details."
+ echo
+ echo "You should have received a copy of the GNU General Public License"
+ echo "along with this program. If not, see <https://www.gnu.org/licenses/>."
+ exit 0
elif [ "$1" = "" ]; then
echo "-> [$(date +%R)] No options specified, generating blog ..."
else
@@ -61,6 +70,12 @@ else
exit 1
fi
+echo "Copyright (C) 2021 Vitali64 <vitali64pmemail@protonmail.com>"
+echo "This program comes with ABSOLUTELY NO WARRANTY."
+echo "This is free software, and you are welcome to modify it,"
+echo "use it where you see fit, and redistribute it"
+echo "under certain conditions; type './seen.sh --license' for details."
+
# Create the www/ folder if removed
mkdir -p "www" || die "Cannot create www/ directory: mkdir -p returns an error!"