Mercurial > pkg
view src/system-init.pl @ 27:738745bfa17b
remove broken files.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 10 Jan 2013 15:21:57 +0000 |
parents | 5caff062fd36 |
children | 819e950ac8cc |
line wrap: on
line source
1 #!/usr/bin/env perl3 use Cwd;5 sub create_install_dir{6 @install_cmd =7 ("install", "-d", "-m",8 "775", "-o", "root", "-g",9 "install", $_[0]);10 print "@install_cmd\n";11 system(@install_cmd) and die $!;}13 @install_dirs = qw(14 /usr/bin15 /usr/sbin16 /usr/include17 /usr/lib18 /usr/man/man119 /usr/man/man220 /usr/man/man321 /usr/man/man422 /usr/man/man523 /usr/man/man624 /usr/man/man725 /usr/man/man826 /usr/doc27 /usr/info28 /usr/local/man/man129 /usr/local/man/man230 /usr/local/man/man331 /usr/local/man/man432 /usr/local/man/man533 /usr/local/man/man634 /usr/local/man/man735 /usr/local/man/man836 /usr/local/doc37 /usr/local/info38 /usr/share39 /usr/share/dict40 /usr/share/doc41 /usr/share/info42 /usr/share/locale43 /usr/share/man/man144 /usr/share/man/man245 /usr/share/man/man346 /usr/share/man/man447 /usr/share/man/man548 /usr/share/man/man649 /usr/share/man/man750 /usr/share/man/man851 /usr/share/nls52 /usr/share/misc53 /usr/share/terminfo54 /usr/share/zoneinfo55 /usr/share/i18n56 /usr/share/aclocal57 /usr/local/bin58 /usr/local/etc59 /usr/local/include60 /usr/local/lib61 /usr/local/sbin62 /usr/local/share63 /usr/local/share/dict64 /usr/local/share/doc65 /usr/local/share/info66 /usr/local/share/locale67 /usr/local/share/man/man168 /usr/local/share/man/man269 /usr/local/share/man/man370 /usr/local/share/man/man471 /usr/local/share/man/man572 /usr/local/share/man/man673 /usr/local/share/man/man774 /usr/local/share/man/man875 /usr/local/share/nls76 /usr/local/share/misc77 /usr/local/share/terminfo78 /usr/local/share/zoneinfo79 /opt80 /opt/doc81 /opt/info82 /opt/bin83 /opt/include84 /opt/lib85 /opt/man/man186 /opt/man/man287 /opt/man/man388 /opt/man/man489 /opt/man/man590 /opt/man/man691 /opt/man/man792 /opt/man/man893 /var/lib94 /var/opt95 /etc96 /etc/opt97 /sbin98 /bin99 /lib);102 sub execute{103 print "\t$_[0]\n";104 `$_[0]`;105 if ($?){die $!;}106 }108 execute("groupadd --force install");110 foreach $install_dir(@install_dirs){111 create_install_dir($install_dir);}114 execute("find /.hg -type d -print0 | xargs -0 -L 1 -t chmod 2770");115 execute("find /.hg -type f -print0 | xargs -0 -L 1 -t chmod 660");117 execute("install -d -o root -g root -m 755 /pkg/skel");119 execute("chown -Rv root:root /.hg");121 $pwd = getcwd;122 execute("ln -sf $pwd/profile /pkg/skel/.profile");123 execute("ln -sf $pwd/hg-wrapper /pkg/skel/");124 execute("ln -sf $pwd/save-acls /pkg/skel/");125 execute("ln -sf `which hg` /pkg/skel/");127 execute("install -o root -g root -m 660 $pwd/hgignore /.hgignore");128 execute("install -o root -g root -m 660 $pwd/hgrc /.hg/");