Commit b1504370 authored by seth's avatar seth

Merge branch 'dev'

parents 93415ba7 56c36d6f
#!/bin/bash
ARG="${1}"
function help() {
echo "Generate queue files for Slackermedia. Syntax:"
echo "gensqf.sh TEMPLATE (probably slackermedia-master.sqf)"
echo " "
echo "-h, --help Print this help and exit."
echo "-r, --release Git branch, tag, and push release."
}
function release() {
COM=`git rev-list --tags --max-count=1`
FUL=`git describe --tags $COM`
MIN=`echo $FUL | rev | cut -b1`
ADD=`echo $MIN + 1 | bc`
MAX=`echo $FUL | cut -f -2 -d"."`
REL=`echo "$MAX"."$ADD"`
git add slackermedia-a.sqf slackermedia-v.sqf slackermedia-g.sqf
git commit -m "release ${REL}"
git tag -a "${REL}" -m "release ${REL}"
echo "Check things over, push to git repo if everything is OK."
}
function main() {
for SET in a v g
do
#echo ":${SET}"
for LINE in $( < ${ARG} )
do
echo ${LINE} | grep ":${SET}" | cut -f1 -d":" >> slackermedia-"${SET}".sqf
echo ${LINE} | grep ":x" | cut -f1 -d":" >> slackermedia-"${SET}".sqf
done
done
# generate huge
cat ${ARG} | cut -f1 -d":" >> slackermedia-huge.sqf
}
if [ -z "${1}" ]; then
help
exit
elif [ "${1}" == "-h" -o "${1}" == "--help" ]; then
help
exit
elif [ "${1}" == "-r" -o "${1}" == "--release" ]; then
#main
release
fi
#echo "you chose ${ARG}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment