2 # Usage: `sh modify_neverball_pkg_installer.sh Neverball-v1.5.x.mpkg`
3 # Please run this script on the .mpkg installer after building.
4 # PackageMaker doesn't seem to generate suitable sub-package names.
5 # This changes the .pkg 'receipts' to have meaningful names (Neverball_Docs.pkg vs. docs.pkg).
6 distFile
=$1/Contents
/distribution.dist
7 tempDistFile
=$1/Contents
/distribution.dist.temp
8 packageLoc
=$1/Contents
/Packages
/
9 sed 's/neverball.pkg</Neverball.pkg</' "$distFile" > "$tempDistFile"
11 mv "$tempDistFile" "$distFile"
12 sed 's/neverputt.pkg</Neverputt.pkg</' "$distFile" > "$tempDistFile"
14 mv "$tempDistFile" "$distFile"
15 sed 's/data.pkg</Neverball_Data.pkg</' "$distFile" > "$tempDistFile"
17 mv "$tempDistFile" "$distFile"
18 sed 's/docs.pkg</Neverball_Docs.pkg</' "$distFile" > "$tempDistFile"
20 mv "$tempDistFile" "$distFile"
21 sed 's/uninstallNeverball.pkg</Neverball_Uninstaller.pkg</' "$distFile" > "$tempDistFile"
23 mv "$tempDistFile" "$distFile"
24 sed 's/neverballfolder.pkg</Neverball_Icon.pkg</' "$distFile" > "$tempDistFile"
26 mv "$tempDistFile" "$distFile"
27 sed 's/seticon.pkg</Neverball_Seticon.pkg</' "$distFile" > "$tempDistFile"
29 mv "$tempDistFile" "$distFile"
30 mv "$packageLoc/neverball.pkg" "$packageLoc/Neverball.pkg"
31 mv "$packageLoc/neverputt.pkg" "$packageLoc/Neverputt.pkg"
32 mv "$packageLoc/data.pkg" "$packageLoc/Neverball_Data.pkg"
33 mv "$packageLoc/docs.pkg" "$packageLoc/Neverball_Docs.pkg"
34 mv "$packageLoc/uninstallNeverball.pkg" "$packageLoc/Neverball_Uninstaller.pkg"
35 mv "$packageLoc/neverballfolder.pkg" "$packageLoc/Neverball_Icon.pkg"
36 mv "$packageLoc/seticon.pkg" "$packageLoc/Neverball_Seticon.pkg"