17 lines
364 B
Bash
Executable File
17 lines
364 B
Bash
Executable File
#!/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
|