57 lines
1.5 KiB
Bash
Executable File
57 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
#set -x
|
|
tmpDir=/tmp/X_tmp
|
|
|
|
[ -f {$tmpDir} ] && rm -rf "${tmpDir}"
|
|
mkdir -p "${tmpDir}"
|
|
|
|
cd 9_goal
|
|
git status --short > "${tmpDir}/goalStatus.txt"
|
|
git ls-files > "${tmpDir}/goalStageFiles.txt"
|
|
git log origin/master...master --pretty=format:%D > "${tmpDir}/goalPushState.txt"
|
|
git branch -a | sort > "${tmpDir}/goalBranchSetup.txt"
|
|
git remote -v | sort > "${tmpDir}/goalRemotes.txt"
|
|
cd ..
|
|
|
|
cd 5_work
|
|
git status --short > "${tmpDir}/workStatus.txt"
|
|
git ls-files > "${tmpDir}/workStageFiles.txt"
|
|
git log origin/master...master --pretty=format:%D > "${tmpDir}/workPushState.txt"
|
|
git branch -a | sort > "${tmpDir}/workBranchSetup.txt"
|
|
git remote -v | sort > "${tmpDir}/workRemotes.txt"
|
|
cd ..
|
|
|
|
cd "${tmpDir}"
|
|
sed -i '$a\' *.txt
|
|
|
|
echo -n "STATUS - "
|
|
if [[ $(cmp -s "${tmpDir}/goalStatus.txt" "${tmpDir}/workStatus.txt";echo $?) == 0 ]]
|
|
then echo "OK"
|
|
else echo "FAIL"
|
|
fi
|
|
|
|
echo -n "INDEX-FILES - "
|
|
if [[ $(cmp -s "${tmpDir}/goalStageFiles.txt" "${tmpDir}/workStageFiles.txt";echo $?) == 0 ]]
|
|
then echo "OK"
|
|
else echo "FAIL"
|
|
fi
|
|
|
|
echo -n "PUSH-STATE - "
|
|
if [[ $(cmp -s "${tmpDir}/goalPushState.txt" "${tmpDir}/workPushState.txt";echo $?) == 0 ]]
|
|
then echo "OK"
|
|
else echo "FAIL"
|
|
fi
|
|
|
|
echo -n "BRANCH-SETUP - "
|
|
if [[ $(cmp -s "${tmpDir}/goalBranchSetup.txt" "${tmpDir}/workBranchSetup.txt";echo $?) == 0 ]]
|
|
then echo "OK"
|
|
else echo "FAIL"
|
|
fi
|
|
|
|
echo -n "REMOTES - "
|
|
if [[ $(cmp -s "${tmpDir}/goalRemotes.txt" "${tmpDir}/workRemotes.txt";echo $?) == 0 ]]
|
|
then echo "OK"
|
|
else echo "FAIL"
|
|
fi
|
|
|