aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-10-07 11:04:36 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-10-07 11:33:42 +0200
commit9c1b9dbb886c4999012785ee4276c953eb92d13b (patch)
tree997ffca0927432bcb388b60f9c07ee353f4e4672
parent10c741bd9ff53e86e6a5035f09af159f7116b6c8 (diff)
downloadvendor_replicant-release-scripts-9c1b9dbb886c4999012785ee4276c953eb92d13b.tar.gz
vendor_replicant-release-scripts-9c1b9dbb886c4999012785ee4276c953eb92d13b.tar.bz2
vendor_replicant-release-scripts-9c1b9dbb886c4999012785ee4276c953eb92d13b.zip
Add Replicant 11 RELEASE_DEVICES
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-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