Я сомневаюсь относительно этого, но вот немного подсказок, который работает на Вас,
Зависимости и файлы хранятся в /var/lib/pacman/local/XX-Version/{desc, files}
, таким образом, не трудно сжать их.
Иерархия в xz пакете должна быть похожей на это:
.PKGINFO и.INSTALL (сценарий установки сообщения) могут быть преобразованы из PKGBUILD (который восстановим через брюшной пресс или yaourt).
Мой вопрос, там способ сделать исполняемый файл в
$PATH
имейте предпочтение по встроенной оболочке путем выполнения только, например.cd
без встроенного или команды?
Можно использовать встроенное enable
отключить/разрешить встроенное. Скажите:
enable -n cd
отключить встроенное cd
. Сказать enable cd
включить встроенное.
Следующее дало бы пример переключения между встроенным и командой:
$ type cd
cd is a shell builtin
$ enable -n cd
$ type cd
-bash: type: cd: not found
$ enable cd
$ type kill
kill is a shell builtin
$ enable -n kill
$ type kill
kill is /bin/kill
$ enable kill
$ type kill
kill is a shell builtin
Можно использовать команды command
и builtin
вызвать один или другой.
$ command cd
Будет игнорировать любой builtins тем именем и искать $PATH
. Противоположная команда к этому, которое будет только использовать встроенное, builtin
.
$ builtin cd
$ help enable
enable: enable [-a] [-dnps] [-f filename] [name ...]
Enable and disable shell builtins.
Enables and disables builtin shell commands. Disabling allows you to
execute a disk command which has the same name as a shell builtin
without using a full pathname.
Options:
-a print a list of builtins showing whether or not each is enabled
-n disable each NAME or display a list of disabled builtins
-p print the list of builtins in a reusable format
-s print only the names of Posix `special' builtins
Options controlling dynamic loading:
-f Load builtin NAME from shared object FILENAME
-d Remove a builtin loaded with -f
Without options, each NAME is enabled.
To use the `test' found in $PATH instead of the shell builtin
version, type `enable -n test'.
Exit Status:
Returns success unless NAME is not a shell builtin or an error occurs.
$ type cd
cd is a shell builtin
$ enable -n cd
$ type cd
cd is /usr/bin/cd
$ enable cd
$ type cd
cd is a shell builtin
cd
, без command
или builtin
– Bernhard
14.02.2014, 15:12
command cd
был бы только "КОМАНДА выполнений с ARGS, игнорирующим функции оболочки. КОМАНДА выполнений с ARGS, игнорирующим функции оболочки". таким образом, command cd
все еще назовет встроенный CD. Во всяком случае я действительно обновлял вопрос.
– Bernhard
14.02.2014, 15:18
bash
. Для zsh
command
кажется, делает это действительно.
– Bernhard
14.02.2014, 15:23