Skip to content

Commit

Permalink
updated gist-sync.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Sep 17, 2024
1 parent bf8b1d1 commit 15dc241
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/scripts/gist-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ for readme in *.md; do
else
echo "Gist for '$readme' already matches, not updating"
fi
else
echo "Creating Gist for '$readme'"
gh gist create --public --filename "$readme" --desc "$readme from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base" "$readme"
else
num_lines="$(wc -l < "$readme" | sed 's/[[:space:]]//g')"
if [ "$num_lines" -lt 10 ]; then
continue
fi
echo "Creating Gist for '$readme'"
gh gist create --public --filename "$readme" --desc "$readme from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base" "$readme"
fi
done

0 comments on commit 15dc241

Please sign in to comment.