diff options
author | Landry Breuil <landry@xfce.org> | 2021-06-08 07:25:51 +0000 |
---|---|---|
committer | Simon Steinbeiß <ochosi@xfce.org> | 2021-06-08 07:25:51 +0000 |
commit | 2c3d0deb8b512e1e4f8f5647a2ff893b4f365cc7 (patch) | |
tree | 560646fbd9481f5d593a2d3cbaf5676aca585b8f | |
parent | 7c609066e9ec1dc2876818a84453c2988fa24cd1 (diff) | |
download | xfce4-dev-tools-2c3d0deb8b512e1e4f8f5647a2ff893b4f365cc7.tar.gz |
helpers: Improve script portability
Works better on OpenBSD now.
-rwxr-xr-x | helpers/xfce-do-release | 2 | ||||
-rwxr-xr-x | helpers/xfce-get-release-notes | 2 | ||||
-rwxr-xr-x | helpers/xfce-get-translations | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/helpers/xfce-do-release b/helpers/xfce-do-release index c1f6794..0e32d5c 100755 --- a/helpers/xfce-do-release +++ b/helpers/xfce-do-release @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash component=$1 version=$2 diff --git a/helpers/xfce-get-release-notes b/helpers/xfce-get-release-notes index d37f65f..7cc0c8f 100755 --- a/helpers/xfce-get-release-notes +++ b/helpers/xfce-get-release-notes @@ -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 diff --git a/helpers/xfce-get-translations b/helpers/xfce-get-translations index 4891b09..9bec2c3 100755 --- a/helpers/xfce-get-translations +++ b/helpers/xfce-get-translations @@ -1,4 +1,4 @@ -#!/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 |