Last active
October 27, 2019 11:53
-
-
Save claudiu-cristea/8a108d11ce0c3ea4c3af to your computer and use it in GitHub Desktop.
Park your old Drupal site
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DirectoryIndex index.html | |
| Options -Indexes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir ~/static | |
| cd ~/static | |
| httrack http://arad2012.drupalcamp.ro -O . "arad2012.drupalcamp.ro/*" -N "%p/%n/index%[page].%t" -WqQ%v —robots=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -name "*.html" -type f -print0 | xargs -0 perl -i -pe "s/\.\.\/index\//\.\.\//g" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd ~/static | |
| cp index/index.html . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install httrack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -name "*.html" -type f -print0 | xargs -0 perl -i -pe "s/\/index.html/\//g" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Using perl instead of sed because sed behaves differently on Linux vs. MacOS. | |
| perl -i -pe's/\.\.\///g' index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -name "*.html" -type f -print0 | xargs -0 perl -i -pe "s/\"index\.html\"/\"\.\"/g" | |
| find . -name "*.html" -type f -print0 | xargs -0 perl -i -pe "s/index\.html\#/\.\#/g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment