largeFile-setup.sh to use the utility functions.
Also, removing that silly double-load check: doesn't work.
This commit is contained in:
parent
4c5e6c09ed
commit
b961847325
2 changed files with 23 additions and 35 deletions
|
@ -4,12 +4,7 @@
|
|||
|
||||
SCRIPT_DIR=$(cd $(dirname ${0}); pwd)
|
||||
|
||||
declaim () {
|
||||
echo
|
||||
echo ${*}
|
||||
echo "==============="
|
||||
echo
|
||||
}
|
||||
. ${SCRIPT_DIR}/utils.sh
|
||||
|
||||
REPO_DIR=${SCRIPT_DIR}/largeFileRepo
|
||||
|
||||
|
@ -18,15 +13,15 @@ ${SCRIPT_DIR}/simple-setup.sh ${REPO_DIR}
|
|||
cd ${REPO_DIR}
|
||||
|
||||
declaim "Creating tags"
|
||||
git tag Rel1.0.lw Rel1
|
||||
git tag -m "An annotated tag for the Rel1 release" Rel1.0.a Rel1
|
||||
git tag Rel2.0.lw Rel2
|
||||
git tag -m "An annotated tag for the Rel1 release" Rel2.0.a Rel2
|
||||
git_command git tag Rel1.0.lw Rel1
|
||||
git_command git tag -m "\"An annotated tag for the Rel1 release\"" Rel1.0.a Rel1
|
||||
git_command git tag Rel2.0.lw Rel2
|
||||
git_command git tag -m "\"An annotated tag for the Rel1 release\"" Rel2.0.a Rel2
|
||||
|
||||
declaim "Merging Rel1 and Rel2 into master"
|
||||
git checkout master
|
||||
git merge Rel1
|
||||
git merge -m "commit8" Rel2
|
||||
git_command git checkout master
|
||||
git_command git merge Rel1
|
||||
git_command git merge -m "\"commit8\"" Rel2
|
||||
|
||||
declaim "Repository size in kibibytes: $(du -sk .)"
|
||||
|
||||
|
@ -44,22 +39,22 @@ done
|
|||
mv information_compressed.out largeInformation.md
|
||||
|
||||
declaim "Adding and commiting that new file"
|
||||
git add largeInformation.md
|
||||
git commit -m "A large, awkwardly binary file"
|
||||
git_command git add largeInformation.md
|
||||
git_command git commit -m "\"A large, awkwardly binary file\""
|
||||
|
||||
declaim "Creating and checking out the Rel3 branch"
|
||||
git checkout -b Rel3
|
||||
git_command git checkout -b Rel3
|
||||
|
||||
declaim "Modifying the large binary file on Rel3"
|
||||
cat information.md information.md information.md >> largeInformation.md
|
||||
|
||||
declaim "Adding and commiting that change to the binary file."
|
||||
git add largeInformation.md
|
||||
git commit -m "Changes to that large file"
|
||||
git_command git add largeInformation.md
|
||||
git_command git commit -m "\"Changes to that large file\""
|
||||
|
||||
declaim "Creating and checking out the Rel4 branch"
|
||||
git checkout master
|
||||
git checkout -b Rel4
|
||||
git_command git checkout master
|
||||
git_command git checkout -b Rel4
|
||||
|
||||
declaim "Modifying the large binary file on Rel4"
|
||||
cat largeInformation.md largeInformation.md > largeInformation2.md
|
||||
|
@ -67,18 +62,18 @@ rm largeInformation.md
|
|||
mv largeInformation{2,}.md
|
||||
|
||||
declaim "Adding and commiting that change to the binary file."
|
||||
git add largeInformation.md
|
||||
git commit -m "An even larger file"
|
||||
git_command git add largeInformation.md
|
||||
git_command git commit -m "\"An even larger file\""
|
||||
|
||||
declaim "Merging Rel3 and Rel4 into master"
|
||||
git checkout master
|
||||
git merge Rel3
|
||||
git merge -s recursive -Xtheirs -m "Merge of Rel4 into master" Rel4
|
||||
git_command git checkout master
|
||||
git_command git merge Rel3
|
||||
git_command git merge -s recursive -Xtheirs -m "\"Merge of Rel4 into master\"" Rel4
|
||||
|
||||
declaim "Removing that large file, now."
|
||||
git rm largeInformation.md
|
||||
git commit -m "large binary file gone again"
|
||||
git_command git rm largeInformation.md
|
||||
git_command git commit -m "\"large binary file gone again\""
|
||||
|
||||
git log --oneline --graph --decorate --all
|
||||
git_command git log --oneline --graph --decorate --all
|
||||
|
||||
declaim "Repository size in kibibytes: $(du -sk .)"
|
||||
|
|
7
utils.sh
7
utils.sh
|
@ -1,9 +1,4 @@
|
|||
|
||||
if [ "${UTILS_LOADED}" = "Y" ]; then
|
||||
echo "Returning"
|
||||
return
|
||||
fi
|
||||
|
||||
# A function to make a statement.
|
||||
declaim () {
|
||||
echo
|
||||
|
@ -40,5 +35,3 @@ git_command() {
|
|||
# Execute the command.
|
||||
eval ${*}
|
||||
}
|
||||
|
||||
export UTILS_LOADED="Y"
|
||||
|
|
Loading…
Reference in a new issue