Skip to content

Commit 88c2793

Browse files
committed
cleanup
1 parent 6a8d64e commit 88c2793

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

quickpkg

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ def appNameAndVersion(app_path):
163163
app_name = info_plist.get("CFBundleDisplayName")
164164
if app_name is None:
165165
(app_name, app_ext) = os.path.splitext(os.path.basename(app_path))
166-
#app_name = info_plist.get("CFBundleExecutable")
167166
app_identifier = info_plist.get("CFBundleIdentifier")
168167
app_version = info_plist.get("CFBundleShortVersionString")
169168
if app_version is None:
@@ -195,10 +194,10 @@ if __name__ == "__main__":
195194
parser.add_argument('item_path', help="path to the installer item")
196195

197196
scripts_group = parser.add_argument_group('Installation Scripts',
198-
'''These options will set the installation scripts. You pass an entire folder of scripts,
199-
just like the option of `pkgbuild` or you can give a file for the preinstall or postinstall
200-
scripts respectively. If you give both the --scripts and either one or both of --preinstall
201-
and --postinstall, quickpkg will attempt to merge, but throw an error if it cannot.''')
197+
'''These options will set the installation scripts. You pass an entire folder of scripts,
198+
just like the option of `pkgbuild` or you can give a file for the preinstall or postinstall
199+
scripts respectively. If you give both the --scripts and either one or both of --preinstall
200+
and --postinstall, quickpkg will attempt to merge, but throw an error if it cannot.''')
202201
scripts_group.add_argument('--scripts', help="path to a folder with scripts")
203202
scripts_group.add_argument('--preinstall', '--pre', help="path to the preinstall script")
204203
scripts_group.add_argument('--postinstall', '--post', help="path to the postinstall script")
@@ -207,9 +206,9 @@ if __name__ == "__main__":
207206
help="will be passed through to pkgbuild")
208207
parser.add_argument('--output', '--out', '-o',
209208
help='''path where the package file will be created. If you give the full filename
210-
then you can use '{name}', '{version}' and '{identifier}' as placeholders.
211-
If this is a directory, then the
212-
package will be created with the default filename {name}-{version}.pkg''')
209+
then you can use '{name}', '{version}' and '{identifier}' as placeholders.
210+
If this is a directory, then the
211+
package will be created with the default filename {name}-{version}.pkg''')
213212

214213
parser.add_argument("-v", "--verbosity", action="count", default=0, help="controls amount of logging output (max -vvv)")
215214
parser.add_argument('--version', help='prints the version', action='version', version=quickpkg_version)
@@ -298,7 +297,7 @@ if __name__ == "__main__":
298297
else:
299298
pkg_path = pkg_name
300299
nospace_app_name = app_name.replace(' ', '') # remove spaces
301-
pkg_path= pkg_path.format(name=nospace_app_name, version=app_version, identifier=app_identifier)
300+
pkg_path = pkg_path.format(name=nospace_app_name, version=app_version, identifier=app_identifier)
302301

303302
if not pkg_path.endswith('pkg'):
304303
pkg_path += '.pkg'
@@ -314,7 +313,7 @@ if __name__ == "__main__":
314313
if args.scripts and not os.path.exists(args.scripts):
315314
print "scripts folder %s does not exist!" % args.scripts
316315
cleanup_and_exit(1)
317-
316+
318317
if args.postinstall or args.preinstall:
319318
tmp_scripts_path = tempfile.mkdtemp()
320319
if args.scripts:
@@ -354,7 +353,7 @@ if __name__ == "__main__":
354353
elif args.scripts:
355354
logger("scripts path: %s" % args.scripts, 1)
356355
pkgcmd.extend(["--scripts", args.scripts])
357-
356+
358357
if args.ownership:
359358
pkgcmd.extend(["--ownership", args.ownership])
360359

todo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
- identify shell scripts and build a payload free package
99
- identify mobileconfigs and build a package installer if make-profile-pkg is present
1010
- support for tar, gzip and bzip
11-
- other possible file formats: fonts, prefpanes, Safari extensions?
12-
- identify app just by name or id (could use: mdfind "kMDItemKind == 'Application' && kMDItemDisplayName == 'iTunes'")
11+
? other possible file formats: fonts, prefpanes, Safari extensions?
12+
? identify app just by name or id (could use: mdfind "kMDItemKind == 'Application' && kMDItemDisplayName == 'iTunes'")

0 commit comments

Comments
 (0)