bioatlas / ala-docker

Dockerized version of Atlas of Living Australia components
GNU Affero General Public License v3.0
12 stars 12 forks source link

./baptize does not work on Mac #25

Closed steinho closed 4 years ago

steinho commented 6 years ago

Steins-MBP:ala-docker steinarildhoem$ make theme-dl Downloading bioatlas wordpress theme... Steins-MBP:ala-docker steinarildhoem$ ./baptize.sh grep: warning: recursive search of stdin ^C Steins-MBP:ala-docker steinarildhoem$

Works ok on linux - no-ssl branch

steinho commented 6 years ago

this change helps...

!/bin/bash

f=$(grep -r -e "https://bioatlas.se" * | cut -d: -f1 | sort -d | uniq |grep -e "baptize.sh" -v | xargs)

for i in $f; do echo "sed -i 's,https://bioatlas.se,http://bioatlas.se,g' $i" sed -i 's,https://bioatlas.se,http://bioatlas.se,g' $i done

mskyttner commented 6 years ago

I am looking into the various reported issues but I need some more details on this one.

What is the change that solves this issue @steinho? Removing the indentation in the for loop?

steinho commented 6 years ago

The * in grep command signals any file in local path - and not system wide

mskyttner commented 6 years ago

The fix for this issue provided by @steinho is now in the develop branch and will be merged into master and then closed.

pragermh commented 5 years ago

I'm following the asciicast on macOS Sierra, got the same error, and used the @steinho fix, which seems to work. I'm new to all this, but perhaps ./baptize.sh needs to be edited...again?

pragermh commented 5 years ago

Or, actually, having a closer look, it didn't work. I get this error:

sed -i 's,https://bioatlas.se,http://bioatlas.se,g' wordpress/themes/atlas/bioatlas-wordpress-theme-master/footer.php
sed: ordpress/themes/atlas/bioatlas-wordpress-theme-master/footer.php: No such file or directory
sed -i 's,https://bioatlas.se,http://bioatlas.se,g' wordpress/themes/atlas/bioatlas-wordpress-theme-master/home.php
sed: ordpress/themes/atlas/bioatlas-wordpress-theme-master/home.php: No such file or directory
sed -i 's,https://bioatlas.se,http://bioatlas.se,g' wordpress/themes/atlas/bioatlas-wordpress-theme-master/js/ala_custom.js
sed: ordpress/themes/atlas/bioatlas-wordpress-theme-master/js/ala_custom.js: No such file or directory
sed -i 's,https://bioatlas.se,http://bioatlas.se,g' wordpress/themes/atlas/bioatlas-wordpress-theme-master/template-part-topnav.php
sed: ordpress/themes/atlas/bioatlas-wordpress-theme-master/template-part-topnav.php: No such file or directory

Any ideas?

mskyttner commented 5 years ago

Did you use the "develop" branch? In the asciicast - which needs to be updated - another branch was used.

pragermh commented 5 years ago

Would that be the git fetch origin no-ssl-for-uppsala-workshop:no-ssl-for-uppsala-workshop bit? What should I type instead? Do I need to undo the stuff I've done so far?

mskyttner commented 5 years ago

Have a look here: https://stackoverflow.com/questions/1783405/how-do-i-check-out-a-remote-git-branch

I think something like

git fetch origin
git checkout develop

might work.

pragermh commented 5 years ago

I think this worked:

git fetch
git checkout -t origin/develop

As it gave the following response:

Branch 'develop' set up to track remote branch 'develop' from 'origin'.
Switched to a new branch 'develop'

But now I get other errors downstream, such as:

Pulling dashboard (bioatlas/ala-dashboard:v0.3)...
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.
pragermh commented 5 years ago

The ./baptize.sh gave no response at all this time, so perhaps it's still not working?

shahmanash commented 4 years ago

Add the following at the beginnig of the shell scripy to get the correct sed in your OS

#!/bin/bash
if which gsed > /dev/null; then
    sed=gsed
else
    sed=sed
fi