Skip to content

Commit

Permalink
add -e flag
Browse files Browse the repository at this point in the history
  • Loading branch information
itsnebulalol committed Aug 11, 2022
1 parent 89d23ae commit 3fbab4d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,4 @@ dpkg*
dpkg/
.DS_Store
*/.DS_Store
ipas
ipas/
2 changes: 2 additions & 0 deletions bin/permasigner
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ if __name__ == '__main__':
help="specify a fork of ldid (eg. ProcursusTeam, itsnebulalol [default])")
parser.add_argument('-f', '--folder', type=str,
help="sign multiple IPAs from a direct path to a folder")
parser.add_argument('-e', '--entitlements', type=str,
help="path to entitlements file")
args = parser.parse_args()

if args.version:
Expand Down
7 changes: 4 additions & 3 deletions docs/information/optional-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ description: Flags you can pass through to change options.
## Command Arguments

```
usage: main.py [-h] [-d] [-c] [-u URL] [-p PATH] [-i] [-n] [-o OUTPUT] [-b BUNDLEID] [-N NAME] [-m MINVER] [-v] [-l LDIDFORK] [-f FOLDER]
usage: main.py [-h] [-d] [-c] [-u URL] [-p PATH] [-i] [-n] [-o OUTPUT] [-b BUNDLEID] [-N NAME] [-m MINVER] [-v] [-l LDIDFORK]
[-f FOLDER] [-e ENTITLEMENTS]
options:
-h, --help show help message and exit
Expand All @@ -27,8 +28,8 @@ options:
-v, --version show current version and exit
-l LDIDFORK, --ldidfork LDIDFORK
specify a fork of ldid (eg. ProcursusTeam, itsnebulalol [default])
-f FOLDER, --folder FOLDER
sign multiple IPAs from a direct path to a folder
-e ENTITLEMENTS, --entitlements ENTITLEMENTS
path to entitlements file
```

## Docker Options
Expand Down
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
help="specify a fork of ldid (eg. ProcursusTeam, itsnebulalol [default])")
parser.add_argument('-f', '--folder', type=str,
help="sign multiple IPAs from a direct path to a folder")
parser.add_argument('-e', '--entitlements', type=str,
help="path to entitlements file")
args = parser.parse_args()

if args.version:
Expand Down
8 changes: 5 additions & 3 deletions permasigner/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ def main(self):
print()

with tempfile.TemporaryDirectory() as tmpfolder:
self.logger.log(f"Created temporary directory.", color=Colors.pink)
print()

# If the user's choice is external, download an IPA
# Otherwise, copy the IPA to the temporary directory
if self.args.url:
Expand Down Expand Up @@ -443,6 +440,11 @@ def run(self, tmpfolder, dpkg_in_path, data_dir, is_extracted):

subprocess.run([f'{ldid_cmd}', f'-S{tmpfolder}/entitlements.plist', '-M',
f'-K{cert_path}', '-Upassword', f'{full_app_path}'], stdout=DEVNULL)

if self.args.entitlements:
self.logger.debug(f"Signing with extra entitlements located in {self.args.entitlements}")
subprocess.run([f'{ldid_cmd}', f'-S{self.args.entitlements}', '-M',
f'-K{cert_path}', '-Upassword', f'{full_app_path}'], stdout=DEVNULL)
print()

# Package the deb file
Expand Down
1 change: 0 additions & 1 deletion permasigner/ps_downloader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import hashlib

import requests
import subprocess
from subprocess import DEVNULL
Expand Down

0 comments on commit 3fbab4d

Please sign in to comment.