diff options
author | Jay Freeman <saurik@saurik.com> | 2009-04-08 21:39:43 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2009-04-08 21:39:43 +0000 |
commit | 6774b86da56c1713247148e83d44630675828dee (patch) | |
tree | ada228fb01a2f87a185ed496f449c6fb5239e968 /data/ncurses/_metadata/prerm.c | |
parent | 922ac76bdc9e96b5f3d03b53b85478cc285d06f6 (diff) |
Upgraded ncurses (and with it screen and top); dropped Essential: (*phew*) and moved to pututxline().
git-svn-id: http://svn.telesphoreo.org/trunk@565 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/ncurses/_metadata/prerm.c')
-rw-r--r-- | data/ncurses/_metadata/prerm.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/data/ncurses/_metadata/prerm.c b/data/ncurses/_metadata/prerm.c new file mode 100644 index 000000000..1bcb72a4c --- /dev/null +++ b/data/ncurses/_metadata/prerm.c @@ -0,0 +1,26 @@ +#include <string.h> +#include <unistd.h> + +int main(int argc, char *argv[]) { + if (argc < 2 || ( + strcmp(argv[1], "remove") != 0 + )) return 0; + + 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"); + + if (access("/usr/lib/libcurses.dylib", F_OK) != 0) + symlink("libncurses.5.4.dylib", "/usr/lib/libcurses.dylib"); + if (access("/usr/lib/libncurses.dylib", F_OK) != 0) + symlink("libncurses.5.4.dylib", "/usr/lib/libncurses.dylib"); + + return 0; +} |