From 0582e54b3a59161d262a73671ad67721c00cef3f Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 23 May 2021 21:37:59 +0100 Subject: [PATCH] planet: shellcheck fixes on users-agreed --- .../planet/templates/default/users-agreed.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cookbooks/planet/templates/default/users-agreed.erb b/cookbooks/planet/templates/default/users-agreed.erb index 707a65bfd..f88800a61 100644 --- a/cookbooks/planet/templates/default/users-agreed.erb +++ b/cookbooks/planet/templates/default/users-agreed.erb @@ -6,22 +6,22 @@ T=$(mktemp -d -t -p /var/tmp users.XXXXXXXXXX) export PGPASSFILE=/etc/replication/users-agreed.conf -echo "# user IDs < 286582 who have agreed to the contributor terms. " > $T/users_agreed -echo "# any active user IDs >= 286582 would have agreed as part of the sign-up process." >> $T/users_agreed -psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where id < 286582 and terms_agreed is not null order by id asc" openstreetmap >> $T/users_agreed +echo "# user IDs < 286582 who have agreed to the contributor terms. " > "$T/users_agreed" +echo "# any active user IDs >= 286582 would have agreed as part of the sign-up process." >> "$T/users_agreed" +psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where id < 286582 and terms_agreed is not null order by id asc" openstreetmap >> "$T/users_agreed" -psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where terms_seen and terms_agreed is null order by id asc" openstreetmap > $T/users_disagreed +psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where terms_seen and terms_agreed is null order by id asc" openstreetmap > "$T/users_disagreed" if cmp -s "${T}/users_agreed" "/store/planet/users_agreed/users_agreed.txt"; then : # do nothing else - cp $T/users_agreed /store/planet/users_agreed/users_agreed.txt + cp "$T/users_agreed" /store/planet/users_agreed/users_agreed.txt fi if cmp -s "${T}/users_disagreed" "/store/planet/users_agreed/users_disagreed.txt"; then : # do nothing else - cp $T/users_disagreed /store/planet/users_agreed/users_disagreed.txt + cp "$T/users_disagreed" /store/planet/users_agreed/users_disagreed.txt fi -rm -rf $T +rm -rf "$T" -- 2.39.5