summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/ncurses/_metadata/preinst.c2
-rw-r--r--data/ncurses/_metadata/prerm.c9
2 files changed, 3 insertions, 8 deletions
diff --git a/data/ncurses/_metadata/preinst.c b/data/ncurses/_metadata/preinst.c
index 2c33ad71d..a2e8d5641 100644
--- a/data/ncurses/_metadata/preinst.c
+++ b/data/ncurses/_metadata/preinst.c
@@ -9,7 +9,7 @@ int main(int argc, char *argv[]) {
))) return 0;
unlink("/usr/lib/_ncurses");
- if (symlink("/usr/lib/", "/usr/lib/_ncurses") != 0)
+ if (symlink("/usr/lib", "/usr/lib/_ncurses") != 0)
return 1;
return 0;
diff --git a/data/ncurses/_metadata/prerm.c b/data/ncurses/_metadata/prerm.c
index 1bcb72a4c..cd60db0c7 100644
--- a/data/ncurses/_metadata/prerm.c
+++ b/data/ncurses/_metadata/prerm.c
@@ -9,13 +9,8 @@ int main(int argc, char *argv[]) {
if (unlink("/usr/lib/_ncurses") == -1)
return 1;
- if (mkdir("/usr/lib/_ncurses", 0755) == -1) {
- symlink("/usr/lib/", "/usr/lib/_ncurses");
- return 2;
- }
-
- rename("/usr/lib/libcurses.dylib", "/usr/lib/_ncurses/libcurses.dylib");
- rename("/usr/lib/libncurses.dylib", "/usr/lib/_ncurses/libncurses.dylib");
+ unlink("/usr/lib/libcurses.dylib");
+ unlink("/usr/lib/libncurses.dylib");
if (access("/usr/lib/libcurses.dylib", F_OK) != 0)
symlink("libncurses.5.4.dylib", "/usr/lib/libcurses.dylib");