Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/tools/keys/keys.sh
ring a502259ba9 Quote variables, remove trailing whitespace
If you don't quote your variables the scripts get very buggy if you run
them with arguments with spaces in them, or even run them from a
directory with spaces in its path.
2016-07-02 23:30:03 +02:00

11 lines
301 B
Bash
Executable File

#!/bin/bash
#
# script to make sql file for inserting all "currently trusted" keys
#
root=$(readlink -e "$(dirname "$0")")
touch "$root/keys.sql"
for key in $(cat "$root/keys.txt") ; do
echo "insert into modprivs(pubkey, newsgroup, permission) values('$key', 'overchan', 'all');" >> keys.sql ;
done