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
| #!/bin/bash | |
| # Function to display help message | |
| display_help() { | |
| echo "Usage: $0 [-s SOURCE_DIRECTORY] [-d DESTINATION_DIRECTORY]" | |
| echo "Syncs files from source directory to destination directory based on predefined exclusions." | |
| echo "" | |
| echo "Options:" | |
| echo " -s, --source SOURCE_DIRECTORY Specifies the source directory" | |
| echo " -d, --destination DEST_DIRECTORY Specifies the destination directory" |
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
| #!/bin/bash | |
| # Function to display help message | |
| display_help() { | |
| echo "Usage: $0 [-d SOURCE_DIRECTORY]" | |
| echo "Creates a tar.gz file based on the specified source directory and predefined exclusions." | |
| echo "" | |
| echo "Options:" | |
| echo " -d, --directory SOURCE_DIRECTORY Specifies the source directory" | |
| echo " -h, --help Display this help message" |
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
| #!/bin/bash | |
| origRepoUrl=git@github.com:foo/bar.git | |
| destRepoUrl=git@github.com:new-foo/new-bar.git | |
| git clone --mirror $origRepoUrl | |
| cd $origRepoUrl | |
| git remote add new-origin $destRepoUrl | |
| git push new-origin --mirror |
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
| #!/bin/bash | |
| tar -cvf \ | |
| ~/media-`date +%Y%m%d`.tar \ # Backup filename, create on ~/ for secutiry reasons | |
| --exclude-vcs \ # Exclude any possible vcs files | |
| --exclude='*/cache/*' --exclude='*/cache' \ # Exclude cache files | |
| --exclude='*/.thumbs/*' --exclude='*/.thumbs' \ # Exclude thumbnail files | |
| --exclude='*/tmp/*' --exclude='*/tmp' \ # Exclude tmp files | |
| --exclude='*/js/*' --exclude='*/js' \ # Exclude js generated files | |
| --exclude='*/css/*' --exclude='*/css' \ #Exclude css generated files |