Skip to content
Snippets Groups Projects
Commit 2c3d0deb authored by Landry Breuil's avatar Landry Breuil Committed by Simon Steinbeiß
Browse files

helpers: Improve script portability

Works better on OpenBSD now.
parent 7c609066
No related branches found
No related tags found
1 merge request!54Improve script portability
Pipeline #9641 passed
#!/bin/bash
#!/usr/bin/env bash
component=$1
version=$2
......
......@@ -19,6 +19,6 @@ git log --format=%s ${LAST_TAG}..HEAD | \
grep -v "Back to development" | \
while read line; do \
echo "- $line" | \
fold -s -w $LINE_LENGTH - | \
fold -s -w $LINE_LENGTH | \
sed -e "s/^[^ ]/&/g"
done
#!/bin/bash
#!/usr/bin/env bash
# Just a small script to get all language updates to a repository since a
# commit or tag.
......@@ -28,7 +28,7 @@ printf '%s\n' '- Translation Updates:'
LANGUAGES=$(
for l in $UPDATES; do
echo -n "$(grep '^"Language-Team:' po/$l.po | grep -Po '(?<=: ).*' | grep -Po '^(.*)(?= \(http)')"
echo -n "$(grep '^"Language-Team:' po/$l.po | sed -e 's/.*: //; s/ (http.*//;')"
echo ","
done
)
......@@ -37,7 +37,7 @@ SORTED=$(echo "$LANGUAGES" | sort)
SORTED=${SORTED::-1} # remove last comma
while read line; do
echo -n "$line "
done <<< "$SORTED" | fold -s -w $LINE_LENGTH - | sed -e "s/^[^ ]/${INDENT}&/g" | sed -e 's/[[:space:]]*$//'
done <<< "$SORTED" | fold -s -w $LINE_LENGTH | sed -e "s/^[^ ]/${INDENT}&/g" | sed -e 's/[[:space:]]*$//'
echo ""
if [ "$SILENT" != "silent" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment