Skip to content

Commit

Permalink
Make repository paths not broken
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt authored and Mike Miller committed Nov 18, 2023
1 parent 67b78ad commit 580e6e6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
23 changes: 23 additions & 0 deletions app/gen_apk_repositories.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import os

def trim(x, start, end):
assert x.startswith(start)
assert x.endswith(end)
return x[len(start):-len(end)]

APK_REPOSITORIES = [
('v3.14', 'main'),
('v3.14', 'community'),
]
ARCH = 'x86' # TODO: support more archs

repos_file = []
for version, repo in APK_REPOSITORIES:
with open(f'{os.environ["SRCROOT"]}/deps/aports/{version}/{repo}/{ARCH}/index.txt') as f:
index_name = f.read()
index_name = trim(index_name, 'APKINDEX-', '.tar.gz\n')
repos_file.append(f'http://apk.ish.app/{index_name}/{repo}')

with open(os.path.join(os.environ['BUILT_PRODUCTS_DIR'], os.environ['CONTENTS_FOLDER_PATH'], 'repositories.txt'), 'w') as f:
for line in repos_file:
print(line, file=f)
2 changes: 2 additions & 0 deletions iSH-AOK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1838,6 +1838,7 @@
inputPaths = (
"$(SRCROOT)/deps/aports/main/x86/index.txt",
"$(SRCROOT)/deps/aports/community/x86/index.txt",
"$(SRCROOT)/app/gen_apk_repositories.py",
);
name = "Generate APK Repositories File";
outputFileListPaths = (
Expand Down Expand Up @@ -1954,6 +1955,7 @@
inputPaths = (
"$(SRCROOT)/deps/aports/main/x86/index.txt",
"$(SRCROOT)/deps/aports/community/x86/index.txt",
"$(SRCROOT)/app/gen_apk_repositories.py",
);
name = "Generate APK Repositories File";
outputFileListPaths = (
Expand Down

0 comments on commit 580e6e6

Please sign in to comment.