Include hash generation when committing.
This commit is contained in:
parent
4d5bf40aff
commit
8b2cbd078a
4
Java/scripts/md5
Normal file
4
Java/scripts/md5
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
a833e7598ad65672a9c01306d244b49f -
|
||||||
|
96ce35f2d2dcb555421e00a6afda23ca -
|
||||||
|
fe50a24283991ac63984a3afcac1ac41 -
|
||||||
|
2ac636f584c43a1124affb9ea6bdc7bf -
|
@ -1,5 +1,16 @@
|
|||||||
#Adds a commit message and pushes project to github repository.
|
#Adds a commit message and pushes project to github repository.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
source utils/search.sh
|
||||||
|
|
||||||
|
find . -type f -name md5 -delete
|
||||||
|
|
||||||
|
#Generate a new hash for every sub-directory, which may require an update.
|
||||||
|
FILES=$(ls -d */)
|
||||||
|
for f in $FILES
|
||||||
|
do
|
||||||
|
search $f
|
||||||
|
done
|
||||||
git add -u
|
git add -u
|
||||||
git add *
|
git add *
|
||||||
git commit -m "$*"
|
git commit -m "$*"
|
||||||
|
1
scripts/md5
Normal file
1
scripts/md5
Normal file
@ -0,0 +1 @@
|
|||||||
|
1aaed43b1f90e8ca1926f79f20d836e9 -
|
27
sig
27
sig
@ -5,29 +5,4 @@ define PROJECT_DIR "src/sig"
|
|||||||
define MAIN_CLASS "sig.${PROJECT_NAME}"
|
define MAIN_CLASS "sig.${PROJECT_NAME}"
|
||||||
define OUT_DIR "bin"
|
define OUT_DIR "bin"
|
||||||
|
|
||||||
if [ -z "$1" ]
|
source utils/main.sh
|
||||||
then
|
|
||||||
echo ""
|
|
||||||
echo " Usage: ./sig <command> {args}"
|
|
||||||
echo ""
|
|
||||||
printf "====\tCurrent Configuration"
|
|
||||||
printf "\t====================="
|
|
||||||
for t in ${VARS[@]}
|
|
||||||
do
|
|
||||||
printf "\n\t%-15s%20s" $t ${!t}
|
|
||||||
done
|
|
||||||
printf "\n====================================================="
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
echo " Command List:"
|
|
||||||
FILES=$(ls -1 ./scripts | sed -e 's/\.sh$//' | sed -e 's/^/ /')
|
|
||||||
for f in $FILES
|
|
||||||
do
|
|
||||||
DESC="$(head -n1 ./scripts/$f.sh)"
|
|
||||||
printf "\n\t%-15s%-65s" $f "${DESC:1}"
|
|
||||||
done
|
|
||||||
echo ""
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
./scripts/$1.sh "${*:2}"
|
|
28
utils/main.sh
Normal file
28
utils/main.sh
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo ""
|
||||||
|
echo " Usage: ./sig <command> {args}"
|
||||||
|
echo ""
|
||||||
|
printf "====\tCurrent Configuration"
|
||||||
|
printf "\t====================="
|
||||||
|
for t in ${VARS[@]}
|
||||||
|
do
|
||||||
|
printf "\n\t%-15s%20s" $t ${!t}
|
||||||
|
done
|
||||||
|
printf "\n====================================================="
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo " Command List:"
|
||||||
|
FILES=$(ls -1 ./scripts | sed -e 's/\.sh$//' | sed -e 's/^/ /')
|
||||||
|
for f in $FILES
|
||||||
|
do
|
||||||
|
if [ $f != "md5" ]; then
|
||||||
|
DESC="$(head -n1 ./scripts/$f.sh)"
|
||||||
|
printf "\n\t%-15s%-65s" $f "${DESC:1}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
./scripts/$1.sh "${*:2}"
|
3
utils/md5
Normal file
3
utils/md5
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
44298d14789ec0b1e8bc67bab63cbf14 -
|
||||||
|
548480c89fb8d6668a83ee9e534eb2dd -
|
||||||
|
918a57ceddd604250f2f47216f3323ff -
|
14
utils/search.sh
Normal file
14
utils/search.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
function search() {
|
||||||
|
FILES=$(ls $1)
|
||||||
|
for f in $FILES
|
||||||
|
do
|
||||||
|
if [ -d $1$f ];
|
||||||
|
then
|
||||||
|
echo "$1$f is a directory"
|
||||||
|
search $1$f/
|
||||||
|
else
|
||||||
|
echo "$1$f is a file"
|
||||||
|
md5sum < $1$f >> $1md5
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user