@@ -177,27 +177,6 @@ codeSignEntitlements = [r|<?xml version="1.0" encoding="UTF-8"?>
177177 </dict>
178178</plist>|]
179179
180- makePostInstall :: Format a (Text -> a )
181- makePostInstall = " #!/usr/bin/env bash\n " %
182- " #\n " %
183- " # See /var/log/install.log to debug this\n " %
184- " \n " %
185- " src_pkg=\" $1\"\n dst_root=\" $2\"\n dst_mount=\" $3\"\n sys_root=\" $4\"\n " %
186- " ./dockutil --add \" ${dst_root}/" % s % " \" --allhomes\n "
187-
188- makeScriptsDir :: Options -> DarwinConfig -> Managed T. Text
189- makeScriptsDir Options {oBackend} DarwinConfig {dcAppNameApp} = case oBackend of
190- Cardano _ -> common
191- where
192- common = do
193- tmp <- fromString <$> (liftIO $ getEnv " TMP" )
194- tempdir <- mktempdir tmp " scripts"
195- liftIO $ do
196- cp " data/scripts/dockutil" (tempdir </> " dockutil" )
197- writeTextFile (tempdir </> " postinstall" ) (format makePostInstall dcAppNameApp)
198- chmod executable (tempdir </> " postinstall" )
199- pure $ tt tempdir
200-
201180makeSigningDir :: Managed (T. Text , T. Text )
202181makeSigningDir = do
203182 tmp <- fromString <$> (liftIO $ getEnv " TMP" )
@@ -389,27 +368,21 @@ makeComponentRoot Options{oBackend,oCluster} appRoot darwinConfig@DarwinConfig{d
389368 exit $ ExitFailure 1
390369
391370makeInstaller :: Options -> DarwinConfig -> FilePath -> FilePath -> IO FilePath
392- makeInstaller opts @ Options {oOutputDir} darwinConfig @ DarwinConfig {dcPkgName} componentRoot pkg = do
371+ makeInstaller Options {oOutputDir} DarwinConfig {dcPkgName} componentRoot pkg = do
393372 echo " Making installer ..."
394- let tempPkg1 = format fp (oOutputDir </> pkg)
395- tempPkg2 = oOutputDir </> (dropExtension pkg <.> " unsigned" <.> " pkg" )
373+ let
374+ tempPkg1 = format fp (oOutputDir </> pkg)
375+ tempPkg2 = oOutputDir </> (dropExtension pkg <.> " unsigned" <.> " pkg" )
376+ pkgargs :: [ T. Text ]
377+ pkgargs =
378+ [ " --identifier" , dcPkgName
379+ , " --component" , tt componentRoot
380+ , " --install-location" , " /Applications"
381+ , tempPkg1
382+ ]
396383
397384 mktree oOutputDir
398- with (makeScriptsDir opts darwinConfig) $ \ scriptsDir -> do
399- let
400- pkgargs :: [ T. Text ]
401- pkgargs =
402- [ " --identifier"
403- , dcPkgName
404- , " --scripts" , scriptsDir
405- , " --component"
406- , tt componentRoot
407- , " --install-location"
408- , " /Applications"
409- , tempPkg1
410- ]
411- run " ls" [ " -ltrh" , scriptsDir ]
412- run " pkgbuild" pkgargs
385+ run " pkgbuild" pkgargs
413386
414387 run " productbuild" [ " --product" , " data/plist"
415388 , " --package" , tempPkg1
0 commit comments