Created
December 17, 2018 17:13
Revisions
-
flyinprogrammer created this gist
Dec 17, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/bash set -e BUNDLE_NAME=${1} : "${BUNDLE_NAME:?Name of the bundle file should be the first argument.}" REPO_URL=${2} : "${REPO_URL:?URL of the repo to clone should be the second argument.}" BUNDLE_FILE=$(pwd)/${BUNDLE_NAME}.bundle pushd $(mktemp -d) git clone --mirror ${REPO_URL} . git bundle create ${BUNDLE_FILE} --all popd 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/bin/bash set -e BUNDLE_PATH=${1} : "${BUNDLE_PATH}:?Full path to the bundle file should be the first argument.}" RESTORE_URL=${2} : "${RESTORE_URL}:?URL of the restore respistory destination should be the second argument.}" pushd $(mktemp -d) git clone --mirror ${BUNDLE_PATH} . git remote add restore ${RESTORE_URL} git push --mirror restore popd