From bef27c286b420b7df05f1a0ae54b74a32f911aed Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Thu, 30 Apr 2020 21:31:52 +0100 Subject: [PATCH] Makes icon project script accept source in stdin --- bin/.bin/iconProject | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/.bin/iconProject b/bin/.bin/iconProject index f06eab0b..02577978 100755 --- a/bin/.bin/iconProject +++ b/bin/.bin/iconProject @@ -1,7 +1,10 @@ #!/usr/bin/env bash -node /home/jonathan/GitRepos/chrome-curl/index.js "$1" |\ +pagesource="$(cat -)" +[ -z "$pagesource" ] && pagesource="$(node /home/jonathan/GitRepos/chrome-curl/index.js "$1")" + +echo "$pagesource" |\ #hq '.iconPreview' data hq '.iconPreview' attr style | # This gets the style attribute from the preview element cut -d '"' -f 2 | cut -d ',' -f 2 | # Gets the base 64 out that we want