Skip to content

Commit

Permalink
fix: add better sed
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed Jul 12, 2019
1 parent e867940 commit 1cb1049
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .pristine/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ RED="\033[0;31m"
NC="\033[0m" # No Color
defaultWebsiteName="pristine.builders"
defaultName="Pristine"
defaultLightLogo="https://raw.githubusercontent.com/etclabscore/jade-media-assets/master/jade-logo-light/jade-logo-light%20(PNG)/256x256.png"
defaultDarkLogo="https://raw.githubusercontent.com/etclabscore/jade-media-assets/master/jade-logo-dark/jade-logo-dark%20(PNG)/256x256.png"

echo ""
echo "πŸ’Ž Welcome Pristine Website Post-Install setup! πŸ’Ž"
Expand All @@ -21,9 +23,27 @@ read websiteName

echo ""

echo -e "${BLUE}Enter the light logo URL${NC}"

read lightLogo

echo ""

echo -e "${BLUE}Enter the dark logo URL${NC}"

read darkLogo

echo ""

# using ~ in place of / to avoid slashes in package names conflicting with sed
sed -i "" -e "s~${defaultWebsiteName}~${websiteName}~g" docs/**/*
sed -i "" -e "s~${defaultName}~${name}~g" docs/**/*
find ./docs/**/* -type f -exec sed -i "" -e "s~${defaultWebsiteName}~${websiteName}~g" {} \;
find ./docs/**/* -type f -exec sed -i "" -e "s~${defaultName}~${name}~g" {} \;

sed -i "" -e "s~${defaultWebsiteName}~${websiteName}~g" README.md
sed -i "" -e "s~${defaultName}~${name}~g" README.md

find ./docs/**/* -type f -exec sed -i "" -e "s~${defaultDarkLogo}~${darkLogo}~g" {} \;
find ./docs/**/* -type f -exec sed -i "" -e "s~${defaultLightLogo}~${lightLogo}~g" {} \;

echo -e "${BLUE} πŸš€ Project Setup Completed. πŸš€"

Expand Down

0 comments on commit 1cb1049

Please sign in to comment.