Server IP : 127.0.0.2 / Your IP : 18.118.212.165 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/lib/dpkg/info/ |
Upload File : |
#!/bin/sh set -e pkg=vim-tiny variant=tiny mandir=/usr/share/man # two things to do: # 1) add /usr/bin/vim.variant as alternative for /usr/bin/vim. Priority are # chosen accordingly to the principle: ``more features, higher priority'' # 2) add /usr/bin/gvim as an alternative for gnome-text-editor for variants # built with gnome support. Same principle for the priority above, with the # additional constraint that priority should not be higher than gedit's add_gnome_alternative () { if [ -f /usr/bin/gvim ]; then update-alternatives --install /usr/bin/gnome-text-editor \ gnome-text-editor /usr/bin/vim.$variant $1 \ --slave $mandir/man1/gnome-text-editor.1.gz gnome-text-editor.1.gz \ $mandir/man1/vim.1.gz fi } add_variant_alternative () { if [ "$variant" != "tiny" ]; then update-alternatives --install /usr/bin/vim vim /usr/bin/vim.$variant $1 update-alternatives --install /usr/bin/vimdiff vimdiff /usr/bin/vim.$variant $1 update-alternatives --install /usr/bin/rvim rvim /usr/bin/vim.$variant $1 fi update-alternatives --install /usr/bin/rview rview /usr/bin/vim.$variant $1 # Since other packages provide these commands, we'll setup alternatives for # their manpages, too. for i in vi view ex editor ; do update-alternatives \ --install /usr/bin/$i $i /usr/bin/vim.$variant $1 \ --slave $mandir/fr/man1/$i.1.gz $i.fr.1.gz $mandir/fr/man1/vim.1.gz \ --slave $mandir/it/man1/$i.1.gz $i.it.1.gz $mandir/it/man1/vim.1.gz \ --slave $mandir/pl/man1/$i.1.gz $i.pl.1.gz $mandir/pl/man1/vim.1.gz \ --slave $mandir/ru/man1/$i.1.gz $i.ru.1.gz $mandir/ru/man1/vim.1.gz \ --slave $mandir/ja/man1/$i.1.gz $i.ja.1.gz $mandir/ja/man1/vim.1.gz \ --slave $mandir/man1/$i.1.gz $i.1.gz \ $mandir/man1/vim.1.gz done case "$variant" in gtk*|gtk3*|gnome*|athena*) # gui enabled variants add_gui_variant_alternative $1 ;; esac } add_gui_variant_alternative () { for i in gvim gview rgview rgvim evim eview gvimdiff ; do update-alternatives --install /usr/bin/$i $i /usr/bin/vim.$variant $1 done } case "$pkg" in vim-tiny) add_variant_alternative 10 ;; vim) add_variant_alternative 30 ;; vim-nox) add_variant_alternative 40 ;; vim-gtk|vim-gtk3|vim-athena) add_variant_alternative 50 ;; vim-gnome) # gnome enabled variant add_variant_alternative 60 add_gnome_alternative 45 ;; vim-nox-py2) add_variant_alternative 39 ;; vim-gtk-py2|vim-gtk3-py2|vim-athena-py2) add_variant_alternative 49 ;; vim-gnome-py2) # gnome enabled variant add_variant_alternative 59 add_gnome_alternative 44 esac exit 0