mirror of
https://github.com/friendica/friendica
synced 2025-02-15 08:54:02 +00:00
Merge pull request #14790 from ne20002/issue/288
Downgrade shebang from bin/bash to bin/sh
This commit is contained in:
commit
bd65c4d1a8
2 changed files with 13 additions and 14 deletions
|
@ -1,14 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2010 - 2024 the Friendica project
|
# SPDX-FileCopyrightText: 2010 - 2024 the Friendica project
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
dir=$(cd "${0%[/\\]*}" > /dev/null; pwd)
|
dir=$(cd "$(dirname "$0")" > /dev/null 2>&1; pwd)
|
||||||
|
|
||||||
if [[ -d /proc/cygdrive && $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
|
if [ -d /proc/cygdrive ] && [ "$(which php)" = "$(readlink -n /proc/cygdrive)/*" ]; then
|
||||||
# We are in Cygwin using Windows php, so the path must be translated
|
# We are in Cygwin using Windows php, so the path must be translated
|
||||||
dir=$(cygpath -m "$dir");
|
dir=$(cygpath -m "$dir")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
php "${dir}/console.php" "$@"
|
php "${dir}/console.php" "$@"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2010 - 2024 the Friendica project
|
# SPDX-FileCopyrightText: 2010 - 2024 the Friendica project
|
||||||
#
|
#
|
||||||
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
function resolve {
|
resolve() {
|
||||||
if [ "$(uname)" == "Darwin" ]
|
if [ "$(uname)" = "Darwin" ]
|
||||||
then
|
then
|
||||||
realpath "$1"
|
realpath "$1"
|
||||||
else
|
else
|
||||||
|
@ -17,26 +17,26 @@ function resolve {
|
||||||
|
|
||||||
FULLPATH=$(dirname "$(resolve "$0")")
|
FULLPATH=$(dirname "$(resolve "$0")")
|
||||||
|
|
||||||
if [ "$1" == "--help" ] || [ "$1" == "-h" ]
|
if [ "$1" = "--help" ] || [ "$1" = "-h" ]
|
||||||
then
|
then
|
||||||
echo "$(basename "$(resolve "$0")") [options]"
|
echo "$(basename "$(resolve "$0")") [options]"
|
||||||
echo
|
echo
|
||||||
echo "-a | --addon <name> extract strings from addon 'name'"
|
echo "-a | --addon <name> extract strings from addon 'name'"
|
||||||
echo "-s | --single single addon mode: extract string from current folder"
|
echo "-s | --single single addon mode: extract string from current folder"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MODE='default'
|
MODE='default'
|
||||||
ADDONNAME=
|
ADDONNAME=
|
||||||
if [ "$1" == "--addon" ] || [ "$1" == "-a" ]
|
if [ "$1" = "--addon" ] || [ "$1" = "-a" ]
|
||||||
then
|
then
|
||||||
MODE='addon'
|
MODE='addon'
|
||||||
if [ -z "$2" ]; then echo -e "ERROR: missing addon name\n\nrun_xgettext.sh -a <addonname>"; exit 1; fi
|
if [ -z "$2" ]; then echo "ERROR: missing addon name\n\nrun_xgettext.sh -a <addonname>"; exit 1; fi
|
||||||
ADDONNAME=$2
|
ADDONNAME=$2
|
||||||
if [ ! -d "$FULLPATH/../addon/$ADDONNAME" ]; then echo "ERROR: addon '$ADDONNAME' not found"; exit 2; fi
|
if [ ! -d "$FULLPATH/../addon/$ADDONNAME" ]; then echo "ERROR: addon '$ADDONNAME' not found"; exit 2; fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" == "--single" ] || [ "$1" == "-s" ]
|
if [ "$1" = "--single" ] || [ "$1" = "-s" ]
|
||||||
then
|
then
|
||||||
MODE='single'
|
MODE='single'
|
||||||
fi
|
fi
|
||||||
|
@ -70,7 +70,6 @@ case "$MODE" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
KEYWORDS="-k -kt -ktt:1,2"
|
KEYWORDS="-k -kt -ktt:1,2"
|
||||||
|
|
||||||
echo "Extract strings to $OUTFILE.."
|
echo "Extract strings to $OUTFILE.."
|
||||||
|
@ -119,7 +118,7 @@ case "$MODE" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "" != "$1" ] && [ "$MODE" == "default" ]
|
if [ -n "$1" ] && [ "$MODE" = "default" ]
|
||||||
then
|
then
|
||||||
UPDATEFILE="$(resolve "${FULLPATH}/$1")"
|
UPDATEFILE="$(resolve "${FULLPATH}/$1")"
|
||||||
echo "Merging new strings to $UPDATEFILE.."
|
echo "Merging new strings to $UPDATEFILE.."
|
||||||
|
|
Loading…
Add table
Reference in a new issue