diff --git a/Packaging.Targets/Deb/DebPackageCreator.cs b/Packaging.Targets/Deb/DebPackageCreator.cs index 2ac3d31..4d62582 100644 --- a/Packaging.Targets/Deb/DebPackageCreator.cs +++ b/Packaging.Targets/Deb/DebPackageCreator.cs @@ -93,7 +93,7 @@ public static DebPackage BuildDebPackage( if (!string.IsNullOrEmpty(preInstallScript)) { - pkg.PreInstallScript += preInstallScript; + pkg.PreInstallScript += preInstallScript.Trim().Replace("\r\n", "\n"); if (!preInstallScript.EndsWith("\n")) { @@ -103,7 +103,7 @@ public static DebPackage BuildDebPackage( if (!string.IsNullOrEmpty(postInstallScript)) { - pkg.PostInstallScript += postInstallScript; + pkg.PostInstallScript += postInstallScript.Trim().Replace("\r\n", "\n"); if (!postInstallScript.EndsWith("\n")) { @@ -113,7 +113,7 @@ public static DebPackage BuildDebPackage( if (!string.IsNullOrEmpty(preRemoveScript)) { - pkg.PreRemoveScript += preRemoveScript; + pkg.PreRemoveScript += preRemoveScript.Trim().Replace("\r\n", "\n"); if (!preRemoveScript.EndsWith("\n")) { @@ -123,7 +123,7 @@ public static DebPackage BuildDebPackage( if (!string.IsNullOrEmpty(postRemoveScript)) { - pkg.PostRemoveScript += postRemoveScript; + pkg.PostRemoveScript += postRemoveScript.Trim().Replace("\r\n", "\n"); if (!postRemoveScript.EndsWith("\n")) {