real-world-onion-sites/add-new-sites.sh

25 lines
750 B
Bash
Raw Normal View History

2018-07-09 19:03:04 -04:00
#!/bin/sh
while read category onion_address proof_url title ; do
if [ ! -d "directory/$category" ] ; then
echo oops: bad category $category for $onion_address
exit 1
fi
for existing in `echo directory/*/$onion_address` ; do
if [ -d "$existing" ] ; then
echo onion exists at $existing for $title
continue
fi
done
dir="directory/$category/$onion_address"
mkdir -p $dir || exit 1
echo $title >$dir/title
echo $proof_url >$dir/proof
echo http://$onion_address/ >$dir/urls # add more by hand, later
2018-07-09 19:03:04 -04:00
done <<EOF
2018-07-09 19:50:05 -04:00
securedrop-for-organisations lzpczap7l3zxu7zv.onion https://www.icij.org/securedrop ICIJ / International Consortium of Investigative Journalists
2018-07-09 19:03:04 -04:00
EOF