aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcommon.sh35
-rwxr-xr-xreleasevars.sh13
2 files changed, 41 insertions, 7 deletions
diff --git a/common.sh b/common.sh
index fce719b..60b937c 100755
--- a/common.sh
+++ b/common.sh
@@ -15,13 +15,36 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set_color()
+is_replicant_6()
+{
+ match_replicant_version '^6\.0-'
+}
+
+is_replicant_11()
+{
+ match_replicant_version '^11-'
+}
+
+match_replicant_version()
{
- if [ "$COLOR" = "1" ] ; then
- color_start="\033[36m"
- color_end="\033[0m"
+ regex="$1"
+
+ echo "${RELEASE}" | grep "${regex}" 2>&1 > /dev/null ; ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ true
else
- color_start=""
- color_end=""
+ false
fi
+
+}
+
+set_color()
+{
+ if [ "$COLOR" = "1" ] ; then
+ color_start="\033[36m"
+ color_end="\033[0m"
+ else
+ color_start=""
+ color_end=""
+ fi
}
diff --git a/releasevars.sh b/releasevars.sh
index 6906ad5..b0dd53b 100755
--- a/releasevars.sh
+++ b/releasevars.sh
@@ -33,7 +33,7 @@ if [ -z "${RELEASE}" ] ; then
exit 1
fi
-RELEASE_DEVICES="\
+RELEASE_DEVICES_REPLICANT_6="\
espresso3g \
espressowifi \
i9100 \
@@ -46,6 +46,17 @@ RELEASE_DEVICES="\
n7100 \
"
+RELEASE_DEVICES_REPLICANT_11="\
+ i9300 \
+ i9305 \
+"
+
+if is_replicant_11 ; then
+ RELEASE_DEVICES="${RELEASE_DEVICES_REPLICANT_11}"
+elif is_replicant_6 ; then
+ RELEASE_DEVICES="${RELEASE_DEVICES_REPLICANT_6}"
+fi
+
# The files are in out/dist/${device}/
RELEASE_IMAGES=""
for device in ${RELEASE_DEVICES} ; do