Skip to content

Commit d15c9e3

Browse files
inject.sh: Make constants
1 parent 6ac8b8a commit d15c9e3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

inject.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ ORIGINAL_IPA_URL="https://archive.org/download/i-3-u-so-com.julienadam.cassius-1
1010
ORIGINAL_ICON_URL="https://web.archive.org/web/20240111215624if_/https://is4-ssl.mzstatic.com/image/thumb/Purple/2b/df/56/mzi.rptjtlhi.png/738x0w.png"
1111
IPA_NAME="iloveusomuch.ipa"
1212

13+
ORIGINAL_ZIP_PATH="Payload/Cassius.app/"
14+
ORIGINAL_ZIP_FILES=(
15+
"${ORIGINAL_ZIP_PATH}background.png"
16+
"${ORIGINAL_ZIP_PATH}[email protected]"
17+
"${ORIGINAL_ZIP_PATH}Loader.m4v"
18+
"${ORIGINAL_ZIP_PATH}Videos.m4v"
19+
)
20+
1321
if [ "$1" == "project" ]; then
1422
OUT_DIR="./iloveusomuch/originalAssets"
1523
else
1624
OUT_DIR="./Payload/iloveusomuch.app"
1725
fi
1826

19-
zipPath="Payload/Cassius.app/"
20-
zipFiles=(
21-
"${zipPath}background.png"
22-
"${zipPath}[email protected]"
23-
"${zipPath}Loader.m4v"
24-
"${zipPath}Videos.m4v"
25-
)
26-
2727
# Suggest downloading the original ipa file if it doesn't exit
2828
if ! [ -f "./$ORIGINAL_IPA_NAME" ]; then
2929
echo "The original.ipa file doesn't exist. This script can automatically download it from archive.org."
@@ -51,7 +51,7 @@ fi
5151

5252
# Check if the required files are in place
5353
givenZipFileList=`unzip -Z1 $ORIGINAL_IPA_NAME`
54-
for file in ${zipFiles[@]}; do
54+
for file in ${ORIGINAL_ZIP_FILES[@]}; do
5555
if ! echo "$givenZipFileList" | grep $file >> /dev/null; then
5656
echo "'$file' not found. Are you sure that you're using the correct .ipa file?"
5757
exit 1
@@ -64,7 +64,7 @@ fi
6464

6565
# Create an argument for unzip to extract only these files
6666
zipFilesArg=""
67-
for file in ${zipFiles[@]}; do
67+
for file in ${ORIGINAL_ZIP_FILES[@]}; do
6868
zipFilesArg="${zipFilesArg} ${file}"
6969
done
7070

0 commit comments

Comments
 (0)