I have recently written and tested the Linux port of Windows batch sedbatch.bat, used for mass generation of my BRouter profiles from respective templates.
It creates very interesting possibility to create profiles directly on an Android device, using termux, a great Linux terminal emulator for Android.
( It e.g. allows you to install and use the git command, python, ipython and more.)
It works with all bike/foot/car repositories,
additionally to Windows version optionally with develop GitHub branch as well.
Link to the script on GitHub:
https://github.com/poutnikl/Brouter-profiles/blob/master/sedbatchBelow is copied the current legend comment from the script:
#!/bin/bash
#
#**********************
# Ver 1.1 Fixed generation for Hiking-wet profiles ( by error identical to dry ones )
# Ver 1.2 Parameter "main" generates only main/major profiles
# Ver 1.2.1 Fixed names of Trekking-Dry/Wet profiles ( Was Poutnik instead of Trekking ])
# Ver 1.3.1 Added Shortest-P profile
# Ver 1.3.2 windows batch ported to Linux Bash
# Ver 1.4 Improved script parameter logic. Action paramaters are bike/car/foot, modifiers are master/develop and all/main
# Implemented termux path specifics and profike copying
#
# automatically generates a bunch of Brouter profiles
# based on the bike/car/foot profile templates by Poutnik
#
# When launched,
# 1/ it create a working subfolder in a folder where the script resides
# 2/ it downloads latest bike/car/foot profile template from GitHub depository
# 3/ it generates end user profiles by automatic subtitution of parameters
# 4/ it packs them into a single ZIP archive and deletes the working subfolder content.
# 5/ it optionally copies profiles to the scriot folder
# or from termux private space to Android storage.
#
# ******************************************************
# P R E R E Q U I S I T I E S
# ******************************************************
# 0 This bash script can be run
# either on a desktop Linux
# either on Android within Linux terminal emulator termux.
#
# Points 1-5 applies only if to be run on an Android device
#
# 1 Install termux ( Linux terminal emulator for Android )
#
https://play.google.com/store/apps/details?id=com.termux# Read links below for more
#
https://termux.com#
https://wiki.termux.com/wiki/Main_Page#
https://wiki.termux.com/wiki/Community#
https://github.com/termux#
# 2 Run termux, what open Linux terminal emulator
# 3 Execute "termux-setup-storage"
# if you want to grant termux permissions to write profile files out of its sandbox
# to be able to copy profiles to Android storage.
# It is recommendec not to copy directly to live profiles2 folder.
# (run "apt update && apt upgrade" to make sure that this tool is available)
# See more at
https://wiki.termux.com/wiki/Termux-setup-storage# 4 Check if sed and wget commands are available.
# If not, install them by "pkg install sed" resp. "pkg install wget"
# 5 Check and define withing the script code
# your desired target folder for copying profiles.
#
# 6 If run on Linux, or on termux without jailbreak
# ( the script is testing both )
# the optional (aside of zip with profiles)
# is redirected to the folder the scriot resides.
#
# 7 Both Linux and termux expects placing the sedbatch script
# (subject of later renaming, remsins for historical reasons )
#
# 8
# The sedbatch.sh expects particular command line parameters to do anything.
# "sedbatch.sh" without parameters lists this legend.
# "sedbatch.sh" can be provided by arbitrary sequence of keywords:
# bike car foot main all master develop copy nocopy
#
# bike, car, foot are "action" keywords, generating respective profiles from a profile template
# all(default), main are modifiers, setting scope of generated profiles ( all or the most important)
# master(default), develop are modifiers determining the github repository branch, where the profile template is located
# nocopy(default), copy, copies profiles to Android storage ( jailbroken termux )
# or to the script folder.
#
# Examples of usage'
# "sedbatch.sh bike" generates all profiles from bike trekking template
# and stores them in BR-Bike-Profiles-master-all.zip
# and generates the all profiles for all car, bike and foot transportation modes
#
# "sedbatch.sh main develop bike" generates only selected major profiles from bike trekking template
# from develop branch
#
# "sedbatch.sh copy main foot all bike develop main car"
# generates major profiles for hiking, all profiles for bike trekking
# and selected profiles from car template develop branch.
# Additionally, profiles are copied to selected folder
#
Sent from my Xiaomi MI A2 via Tapatalk