Files
truecharts/tools/port-from-lsio.sh
TrueCharts-Bot 4c2764a13f Commit released Helm Chart and docs for TrueCharts
Signed-off-by: TrueCharts-Bot <bot@truecharts.org>
2021-12-12 22:42:29 +00:00

15 lines
469 B
Bash
Executable File

#!/usr/bin/env bash
# The format of the to-app.txt file is as follows:
# tccr.io/truecharts/CHART:TAG
for i in $(cat to-app.txt); do
PLAIN=${i##*/}
PLAIN=$( echo $PLAIN | cut -d':' -f1 )
CLEAN=${PLAIN//$'\r'/}
echo ${CLEAN##*|}
PORT=$(curl -v --silent https://raw.githubusercontent.com/linuxserver/docker-${CLEAN}/master/README.md | grep " \-p" | grep ':' | head -1 | cut -d':' -f1 | cut -d' ' -f4)
echo "${PORT}:${i}" >> output.txt
done