aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-11-09 03:46:46 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-11-09 03:46:46 +0200
commitb849045a65bb37bee3ab6c0e88ba21559a50d420 (patch)
treedf737496b195c01fbcaceb6236383bcebfe6d281
parent6cbfffa05b858231a6087f95eb07cd94a9d20a67 (diff)
downloadarching-kaos-radio-b849045a65bb37bee3ab6c0e88ba21559a50d420.tar.gz
arching-kaos-radio-b849045a65bb37bee3ab6c0e88ba21559a50d420.tar.bz2
arching-kaos-radio-b849045a65bb37bee3ab6c0e88ba21559a50d420.zip
Updates
- New script ./make_new_list.sh - Style improvements - README update - Safety net
-rw-r--r--README1
-rwxr-xr-xappend_latest_list.sh5
-rw-r--r--client/css/styles.css1
-rwxr-xr-xcreate_list.sh6
-rwxr-xr-xmake_new_list.sh8
5 files changed, 19 insertions, 2 deletions
diff --git a/README b/README
index 297f5a5..a1ca48d 100644
--- a/README
+++ b/README
@@ -20,6 +20,7 @@ Helping scripts:
- ./create_metadata_show.sh
- ./create_static_list.sh
- ./append_latest_list.sh
+- ./make_new_list.sh
Deploy scripts:
- ./init.sh
diff --git a/append_latest_list.sh b/append_latest_list.sh
index 3b66d93..3754683 100755
--- a/append_latest_list.sh
+++ b/append_latest_list.sh
@@ -1,8 +1,9 @@
#!/bin/bash
-if [ ! -f hashes/list ]
+if [ ! -f "hashes/list" ]
then
- echo 'No list to append, use ./create_list.sh instead'
+ echo 'ERROR: No list to append'
+ echo 'Use ./create_list.sh instead'
exit 1
fi
diff --git a/client/css/styles.css b/client/css/styles.css
index 48b2bed..2d05d0e 100644
--- a/client/css/styles.css
+++ b/client/css/styles.css
@@ -3,6 +3,7 @@ body {
color: lightgreen;
margin: 0px;
padding: 2vh 4vw;
+ font-family: Monospace;
}
.logo {
diff --git a/create_list.sh b/create_list.sh
index d39fdfa..bc101be 100755
--- a/create_list.sh
+++ b/create_list.sh
@@ -20,6 +20,12 @@
# Just for convenience, we will simply make up a list of files found in hashes
# we will be searching for files smaller than 4096 bytes. An extra check with
# `file` to find 'JSON text data'.
+if [ -f "hashes/list" ]
+then
+ echo 'ERROR: This script creates the first list only'
+ echo 'Use ./append_latest_list.sh instead'
+ exit 1
+fi
json_file_list="$(mktemp)"
find hashes -type f -size -4096 | sort | while read filepath
do
diff --git a/make_new_list.sh b/make_new_list.sh
new file mode 100755
index 0000000..5be0795
--- /dev/null
+++ b/make_new_list.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [ ! -f "hashes/list" ]
+then
+ ./create_list.sh
+else
+ ./append_latest_list.sh
+fi