Update outdated scripts

This commit is contained in:
Davide De Rosa 2022-09-25 08:44:30 +02:00
parent 025421aa08
commit a3a245c499
4 changed files with 15 additions and 28 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
PATTERN="Passepartout/App/iOS/fastlane/metadata/*/description.txt"
PATTERN="Passepartout/App/fastlane/ios/metadata/*/description.txt"
AFTER=$1
NAME=$2
DELIMITER="†"

View File

@ -1,7 +1,7 @@
#!/bin/sh
SIZES="120 152 167 180 76"
cd Passepartout/App/iOS/Assets.xcassets/AppIcon.appiconset
cd Passepartout/App/Assets.xcassets/AppIcon.appiconset
for S in $SIZES; do
convert -geometry "${S}x${S}" AppIcon-1024.png AppIcon-$S.png
done

View File

@ -1,5 +1,6 @@
#!/bin/sh
. .env.$1
APP_ROOT="Passepartout/App"
APP_SHARED_ROOT="Passepartout/AppShared"
DIST="l10n"
DIST_APP="$DIST/App"
@ -10,19 +11,17 @@ rm -rf $OUTPUT $DIST
mkdir -p $DIST_APP
mkdir -p $DIST_META
if [[ $2 == "all" ]]; then
cp Passepartout/Core/Resources/en.lproj/Core.strings $DIST_APP/Core.txt
cp Passepartout/Core/Resources/en.lproj/Intents.strings $DIST_APP/Intents.txt
cp $APP_ROOT/en.lproj/App.strings $DIST_APP/App.txt
if [[ $1 == "all" ]]; then
cp $APP_SHARED_ROOT/en.lproj/Localizable.strings $DIST_APP/Localizable.txt
cp $APP_ROOT/Intents/en.lproj/Intents.strings $DIST_APP/Intents.txt
cp $APP_ROOT/en.lproj/InfoPlist.strings $DIST_APP/InfoPlist.txt
cp $APP_ROOT/fastlane/metadata/en-US/name.txt $DIST_META
cp $APP_ROOT/fastlane/metadata/en-US/subtitle.txt $DIST_META
cp $APP_ROOT/fastlane/metadata/en-US/description.txt $DIST_META
cp $APP_ROOT/fastlane/ios/metadata/en-US/name.txt $DIST_META
cp $APP_ROOT/fastlane/ios/metadata/en-US/subtitle.txt $DIST_META
cp $APP_ROOT/fastlane/ios/metadata/en-US/description.txt $DIST_META
elif [[ $2 == "new" ]]; then
grep -f templates/new-strings.txt Passepartout/Core/Resources/en.lproj/Core.strings >$DIST_APP/Core.txt
grep -f templates/new-strings.txt Passepartout/Core/Resources/en.lproj/Intents.strings >$DIST_APP/Intents.txt
grep -f templates/new-strings.txt $APP_ROOT/en.lproj/App.strings >$DIST_APP/App.txt
grep -f templates/new-strings.txt $APP_SHARED_ROOT/en.lproj/Localizable.strings >$DIST_APP/Localizable.txt
grep -f templates/new-strings.txt $APP_ROOT/en.lproj/Intents.strings >$DIST_APP/Intents.txt
grep -f templates/new-strings.txt $APP_ROOT/en.lproj/InfoPlist.strings >$DIST_APP/InfoPlist.txt
else
echo "No argument given (all|new)"

View File

@ -1,21 +1,9 @@
#!/bin/sh
. .env.$1
DIR_APP="$APP_ROOT"
FILENAME_APP="App.strings"
DIR_CORE="Passepartout/Core/Resources"
FILENAME_CORE="Core.strings"
if [[ $3 = "core" ]]; then
DIR=$DIR_CORE
FILENAME=$FILENAME_CORE
else
DIR=$DIR_APP
FILENAME=$FILENAME_APP
fi
DIR="Passepartout/AppShared"
FILENAME="Localizable.strings"
LANG_BASE="en"
LANG_TARGET="$2"
LANG_TARGET="$1"
STRINGS_BASE="$DIR/$LANG_BASE.lproj/$FILENAME"
STRINGS_TARGET="$DIR/$LANG_TARGET.lproj/$FILENAME"
IDS="string-ids.tmp"