summaryrefslogtreecommitdiff
path: root/pull_thoughts
diff options
context:
space:
mode:
authorgrothedev <grothedev@gmail.com>2021-08-03 23:00:13 -0500
committergrothedev <grothedev@gmail.com>2021-08-03 23:00:13 -0500
commit8f8e7fc9ef16b41c39907aa80b764bcedcd5538c (patch)
treef3ee5896287abcc32da325043804b5e2d0f366a9 /pull_thoughts
parent802685c9a2f411150aa6f2d310be93e684479917 (diff)
updates
Diffstat (limited to 'pull_thoughts')
-rwxr-xr-xpull_thoughts30
1 files changed, 18 insertions, 12 deletions
diff --git a/pull_thoughts b/pull_thoughts
index f41875e..386506a 100755
--- a/pull_thoughts
+++ b/pull_thoughts
@@ -1,13 +1,19 @@
#
-t="/srv/www/thesite/public/t"
-scp hb:$t ~/do.remote
-if [ -s ~/do.remote ]
-then
- cp ~/do ~/do.prev
- cat ~/do.remote > ~/do
- echo "" >> ~/do
- cat ~/do.prev >> ~/do
- rm ~/do.remote
- rm ~/do.prev
-fi
-ssh hb "echo '' >> $t.bak; cat $t >> $t.bak; rm $t; touch $t; chmod a+w $t; sudo chown www-data:www-data $t"
+exit 1
+#TODO update
+t="/srv/www/thesite/public/t/*"
+scp -r hb:$t ~/t.remote/
+for f in `ls ~/t.remote/`; do
+ if [ -e ~/${f} ]; then
+ fog=~/${f}
+ elif [ -e ~/doc/${f} ]; then
+ fog=~/doc/${f}
+ fi
+ cp ${fog} ${fog}.prev
+ cat ~/t.remote/${f} > ${fog}
+ echo "" >> ${fog}
+ cat ${fog}.prev >> ${fog}
+ rm ~/t.remote/${f}
+ rm ${f}.prev
+ ssh hb "echo '' >> ${f}.bak; cat ${fog} >> ${f}.bak; rm ${f}; touch ${f}; chmod a+w ${f}; sudo chown www-data:www-data ${f}"
+done