init
This commit is contained in:
16
scripts/create_change_file.sh
Executable file
16
scripts/create_change_file.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
if [ "x${BRANCH}" != "x" ] && [ "${BRANCH}" != "HEAD" ]
|
||||
then
|
||||
FILE="incoming_changes/${BRANCH}.md"
|
||||
if [ -e $FILE ]
|
||||
then
|
||||
echo "file '${FILE}' already exists"
|
||||
else
|
||||
touch "${FILE}"
|
||||
echo "file '${FILE}' created"
|
||||
fi
|
||||
else
|
||||
echo "branch name '${BRANCH}' is not valid"
|
||||
fi
|
||||
Reference in New Issue
Block a user