diff options
author | Christopher James Halse Rogers <raof@ubuntu.com> | 2014-01-17 15:47:57 +1100 |
---|---|---|
committer | Christopher James Halse Rogers <raof@ubuntu.com> | 2014-01-17 15:48:15 +1100 |
commit | c6ee8c77b20371507033a8907fa10325e3e6da25 (patch) | |
tree | a22670020c0c6ff4bd4d26afa8ab3b75816ea391 /debian | |
parent | 2b000597338c797e4996c136a98f8463a537805e (diff) | |
download | mono-c6ee8c77b20371507033a8907fa10325e3e6da25.tar.gz |
Make the install-framework commmand idempotent
Diffstat (limited to 'debian')
-rw-r--r-- | debian/mono.runtime-script | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/debian/mono.runtime-script b/debian/mono.runtime-script index 5e0738be4d..bae013dee0 100644 --- a/debian/mono.runtime-script +++ b/debian/mono.runtime-script @@ -45,8 +45,7 @@ if ($mode eq "install-framework") my $uninstall = "$basedir/$basename.mono-framework"; - - open UNINSTALL, ">$uninstall" + open UNINSTALL, ">$uninstall" or die "E: Cannot open uninstall: $uninstall"; while (@ARGV) @@ -62,6 +61,12 @@ if ($mode eq "install-framework") my $target = "$runtime_versions{$framework_ver}/" . basename($dll); + if (-f $target) + { + # Ensure we're idempotent + unlink $target; + } + symlink $dll, $target or die "E: Unable to install $dll into framework path: $target\n"; print UNINSTALL "$target\n"; |