Browse Source
[ci, tools] shellcheck-ed
[ci, tools] shellcheck-ed
* now license-header.sh is POSIX compliant
* update-icons now checks for dependencies the correct way
* add --help to license-header
* nuke reset-submodules
* add missing shebang to .ci/windows/package.sh
* Below the error/warnings/infos from shellcheck:
-- SC2068 (error): Double quote array expansions to avoid re-splitting elements.
-- SC3054 (warning): In POSIX sh, array references are undefined.
-- SC2155 (warning): Declare and assign separately to avoid masking return values.
-- SC2046 (warning): Quote this to prevent word splitting.
-- SC2236 (style): Use -n instead of ! -z.
-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
-- SC2001 (style): See if you can use ${variable//search/replace} instead.
-- SC2086 (info): Double quote to prevent globbing and word splitting.
-- SC2185 (info): Some finds don't have a default path. Specify '.' explicitly.
Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
pull/397/head
committed by
crueter
15 changed files with 202 additions and 159 deletions
-
9.ci/android/build.sh
-
2.ci/android/package.sh
-
125.ci/license-header.sh
-
6.ci/linux/build.sh
-
101.ci/linux/package.sh
-
7.ci/source.sh
-
9.ci/translate.sh
-
44.ci/update-icons.sh
-
16.ci/windows/build.sh
-
7.ci/windows/package.sh
-
2tools/cpm-fetch-all.sh
-
21tools/cpm-fetch.sh
-
2tools/cpm-hash.sh
-
8tools/reset-submodules.sh
-
2tools/url-hash.sh
@ -1,11 +1,14 @@ |
|||||
#!/bin/sh |
#!/bin/sh |
||||
|
|
||||
|
# SPDX-FileCopyrightText: 2025 Eden Emulator Project |
||||
|
# SPDX-License-Identifier: GPL-3.0-or-later |
||||
|
|
||||
for i in dist/languages/*.ts; do |
for i in dist/languages/*.ts; do |
||||
SRC=en_US |
SRC=en_US |
||||
TARGET=`head -n1 $i | awk -F 'language="' '{split($2, a, "\""); print a[1]}'` |
|
||||
|
TARGET=$(head -n1 "$i" | awk -F 'language="' '{split($2, a, "\""); print a[1]}') |
||||
|
|
||||
# requires fd |
# requires fd |
||||
SOURCES=`fd . src/yuzu -tf -e ui -e cpp -e h -e plist` |
|
||||
|
SOURCES=$(fd . src/yuzu -tf -e ui -e cpp -e h -e plist) |
||||
|
|
||||
lupdate -source-language $SRC -target-language $TARGET $SOURCES -ts /data/code/eden/$i |
|
||||
|
lupdate -source-language $SRC -target-language "$TARGET" "$SOURCES" -ts /data/code/eden/"$i" |
||||
done |
done |
||||
@ -1,21 +1,35 @@ |
|||||
#!/bin/sh -e |
#!/bin/sh -e |
||||
|
|
||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project |
|
||||
|
# SPDX-FileCopyrightText: 2025 Eden Emulator Project |
||||
# SPDX-License-Identifier: GPL-3.0-or-later |
# SPDX-License-Identifier: GPL-3.0-or-later |
||||
|
|
||||
which png2icns || [ which yay && yay libicns ] || exit |
|
||||
which magick || exit |
|
||||
|
# Check dependencies |
||||
|
for cmd in png2icns magick svgo; do |
||||
|
if ! which "$cmd" >/dev/null 2>&1; then |
||||
|
pkg="$cmd" |
||||
|
case "$cmd" in |
||||
|
png2icns) pkg="icnsutils" ;; |
||||
|
magick) pkg="imagemagick" ;; |
||||
|
esac |
||||
|
echo "Error: command '$cmd' not found. Install the package '$pkg'." |
||||
|
exit 1 |
||||
|
fi |
||||
|
done |
||||
|
|
||||
export EDEN_SVG_ICO="dist/dev.eden_emu.eden.svg" |
export EDEN_SVG_ICO="dist/dev.eden_emu.eden.svg" |
||||
svgo --multipass $EDEN_SVG_ICO |
|
||||
|
|
||||
magick -density 256x256 -background transparent $EDEN_SVG_ICO \ |
|
||||
-define icon:auto-resize -colors 256 dist/eden.ico || exit |
|
||||
convert -density 256x256 -resize 256x256 -background transparent $EDEN_SVG_ICO \ |
|
||||
dist/yuzu.bmp || exit |
|
||||
|
|
||||
export TMP_PNG="dist/eden-tmp.png" |
|
||||
magick -size 1024x1024 -background transparent $EDEN_SVG_ICO $TMP_PNG || exit |
|
||||
png2icns dist/eden.icns $TMP_PNG || exit |
|
||||
cp dist/eden.icns dist/yuzu.icns |
|
||||
rm $TMP_PNG |
|
||||
|
TMP_PNG="$(mktemp /tmp/eden-tmp-XXXXXX.png)" |
||||
|
|
||||
|
svgo --multipass "$EDEN_SVG_ICO" |
||||
|
|
||||
|
magick \ |
||||
|
-density 256x256 -background transparent "$EDEN_SVG_ICO" \ |
||||
|
-define icon:auto-resize -colors 256 "dist/eden.ico" |
||||
|
|
||||
|
magick "$EDEN_SVG_ICO" -resize 256x256 -background transparent "dist/yuzu.bmp" |
||||
|
|
||||
|
magick -size 1024x1024 -background transparent "$EDEN_SVG_ICO" "$TMP_PNG" |
||||
|
|
||||
|
png2icns "dist/eden.icns" "$TMP_PNG" |
||||
|
|
||||
|
cp "dist/eden.icns" "dist/yuzu.icns" |
||||
|
rm -f "$TMP_PNG" |
||||
@ -1,4 +1,4 @@ |
|||||
#!/bin/sh |
#!/bin/sh |
||||
|
|
||||
SUM=`wget -q https://github.com/$1/archive/$2.zip -O - | sha512sum` |
|
||||
|
SUM=$(wget -q https://github.com/"$1"/archive/"$2".zip -O - | sha512sum) |
||||
echo "$SUM" | cut -d " " -f1 |
echo "$SUM" | cut -d " " -f1 |
||||
@ -1,8 +0,0 @@ |
|||||
#!/bin/bash -ex |
|
||||
|
|
||||
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project |
|
||||
# SPDX-License-Identifier: MIT |
|
||||
|
|
||||
git submodule sync |
|
||||
git submodule foreach --recursive git reset --hard |
|
||||
git submodule update --init --recursive |
|
||||
@ -1,4 +1,4 @@ |
|||||
#!/bin/sh |
#!/bin/sh |
||||
|
|
||||
SUM=`wget -q $1 -O - | sha512sum` |
|
||||
|
SUM=$(wget -q "$1" -O - | sha512sum) |
||||
echo "$SUM" | cut -d " " -f1 |
echo "$SUM" | cut -d " " -f1 |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue