xwords/xwords4/android/scripts/gen_gcmid.sh

21 lines
400 B
Bash
Executable file

#!/bin/sh
set -e -u
GCM_SENDER_ID=${GCM_SENDER_ID:-""}
if [ -z "$GCM_SENDER_ID" ]; then
echo "GCM_SENDER_ID empty; GCM use will be disabled" >&2
fi
PKG=$1
cat <<EOF
// Auto-generated: DO NOT CHECK THIS IN until questions about
// obscuring the id are cleared up
package org.eehouse.android.$PKG;
public class GCMConsts {
public static final String SENDER_ID = "${GCM_SENDER_ID}";
}
EOF