Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
idString=`ipfs id`
str="ID\": \""
subIdStr=${idString#*$str}
str1="\","
subIdStr1=${subIdStr%%$str1*}
echo $subIdStr1
sed -i "" "/root: / s/\/ipns\/$subIdStr1\//\//" _config.yml
sed -i "" "/url: / s/http:\/\/ipfs.io\/ipns\/$subIdStr1/http:\/\/liuqinh2s.github.io/" _config.yml
hexo clean
hexo g -d
sed -i "" "/root: / s/\//\/ipns\/${subIdStr1}\//" _config.yml
sed -i "" "/url: / s/http:\/\/liuqinh2s.github.io/http:\/\/ipfs.io\/ipns\/${subIdStr1}/" _config.yml
hexo clean
hexo g
string=`ipfs add -r public/`
subStr=${string##*added }
subStr1=${subStr% public}
ipfs name publish $subStr1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.