From 37423ea070227a447caf3dc7e8e93cd76e8c147d Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 22 Apr 2019 11:06:38 +0000 Subject: [PATCH] Fixes --- script.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script.sh b/script.sh index fa4d0be..ae47775 100755 --- a/script.sh +++ b/script.sh @@ -1,5 +1,7 @@ #!/bin/bash -cd $1/ypmirror +cd $1 +git pull origin master +cd ypmirror git reset --hard git pull origin master @@ -7,6 +9,7 @@ for f in $(find . -type f -name '*.php'); do curl "$2/$f" -so "$f" mv "$f" "${f/php/html}" done +find . -type f -exec sed 's/\.php/\.html/g' -i {} + cd .. hash=$(ipfs name publish /ipfs/$(ipfs add -r ypmirror/ | sed '/ ypmirror$/!d;s/added //;s/ .*//g') | sed 's/:.*//g;s/Published to //g')