From 2c3d0deb8b512e1e4f8f5647a2ff893b4f365cc7 Mon Sep 17 00:00:00 2001 From: Landry Breuil Date: Tue, 8 Jun 2021 07:25:51 +0000 Subject: helpers: Improve script portability Works better on OpenBSD now. --- helpers/xfce-do-release | 2 +- helpers/xfce-get-release-notes | 2 +- 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 -- cgit v1.2.1