lainchan-webring

Code for the unofficial lainchan webring.
git clone git://git.concealed.world/lainchan-webring
Log | Files | Refs | README | LICENSE

commit 71c12c2be3fbc8c7359eca5a0f96db5c9893b253
parent 96af2b5b9cc8dce07222d42c151ad86e3b190f1e
Author: Nixx <nixx@firemail.cc>
Date:   Mon, 23 Aug 2021 07:15:54 +0100

check-up - fix order

Diffstat:
Mcheck-up | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/check-up b/check-up @@ -17,6 +17,10 @@ # # DEPENDS: coreutils, bash, torsocks +# For the benefit of cron jobs, set the path +[ $# -ne 1 ] && echo "Path must be specified." && exit 1 +FILEPATH="${1}" + OUTPUT=${FILEPATH}sites_up.txt createfile () { @@ -62,10 +66,6 @@ doconnections () { rm "${TMPOUT}" } -# For the benefit of cron jobs, set the path -[ $# -ne 1 ] && echo "Path must be specified." && exit 1 -FILEPATH="${1}" - CLEARDOMAINS=$(grep "^clearnet" "${FILEPATH}webring.csv" | cut -d , -f 3) ONIONDOMAINS=$(grep "^onion" "${FILEPATH}webring.csv" | cut -d , -f 3) @@ -78,7 +78,7 @@ echo "${ONIONDOMAINS}" > "${ONIONTMP}" [ -z "${CLEARTMP}" ] && exit 2 [ -z "${ONIONTMP}" ] && exit 3 -# If either output file does not exist, create it +# If output file does not exist, create it [ -z "${OUTPUT}" ] && createfile "${CLEARTMP}" "${OUTPUT}" && createfile "${ONIONTMP}" "${OUTPUT}" && sed -i "s/$/ 0/" "${OUTPUT}" TMPO1=$(mktemp)