diff options
author | Rob Landley <rob@landley.net> | 2005-12-15 07:25:54 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-12-15 07:25:54 +0000 |
commit | e0c418e13b005908da492ae2151096e8f2246287 (patch) | |
tree | e03f9d292096eedba0bedca225db5f89938a9630 | |
parent | 164c5c80ba122a6ed71a29d41730c802750a5ae1 (diff) | |
download | busybox-w32-e0c418e13b005908da492ae2151096e8f2246287.tar.gz busybox-w32-e0c418e13b005908da492ae2151096e8f2246287.tar.bz2 busybox-w32-e0c418e13b005908da492ae2151096e8f2246287.zip |
The rest of Yann E. Morin's install revamp.
-rw-r--r-- | Rules.mak | 12 | ||||
-rwxr-xr-x | applets/install.sh | 11 | ||||
-rw-r--r-- | sysdeps/linux/Config.in | 29 |
3 files changed, 47 insertions, 5 deletions
@@ -205,4 +205,16 @@ endif | |||
205 | # have a chance of winning. | 205 | # have a chance of winning. |
206 | CFLAGS += $(CFLAGS_EXTRA) | 206 | CFLAGS += $(CFLAGS_EXTRA) |
207 | 207 | ||
208 | #------------------------------------------------------------ | ||
209 | # Installation options | ||
210 | ifeq ($(strip $(CONFIG_INSTALL_APPLET_HARDLINKS)),y) | ||
211 | INSTALL_OPTS=--hardlinks | ||
212 | endif | ||
213 | ifeq ($(strip $(CONFIG_INSTALL_APPLET_SYMLINKS)),y) | ||
214 | INSTALL_OPTS=--symlinks | ||
215 | endif | ||
216 | ifeq ($(strip $(CONFIG_INSTALL_APPLET_DONT)),y) | ||
217 | INSTALL_OPTS= | ||
218 | endif | ||
219 | |||
208 | .PHONY: dummy | 220 | .PHONY: dummy |
diff --git a/applets/install.sh b/applets/install.sh index d163a2ef8..2fcd2ae6e 100755 --- a/applets/install.sh +++ b/applets/install.sh | |||
@@ -8,12 +8,13 @@ if [ "$prefix" = "" ]; then | |||
8 | echo "No installation directory, aborting." | 8 | echo "No installation directory, aborting." |
9 | exit 1; | 9 | exit 1; |
10 | fi | 10 | fi |
11 | if [ "$2" = "--hardlinks" ]; then | ||
12 | linkopts="-f" | ||
13 | else | ||
14 | linkopts="-fs" | ||
15 | fi | ||
16 | h=`sort busybox.links | uniq` | 11 | h=`sort busybox.links | uniq` |
12 | case "$2" in | ||
13 | --hardlinks) linkopts="-f";; | ||
14 | --symlinks) linkopts="-fs";; | ||
15 | "") h="";; | ||
16 | *) echo "Unknown install option: $2"; exit 1;; | ||
17 | esac | ||
17 | 18 | ||
18 | 19 | ||
19 | rm -f $prefix/bin/busybox || exit 1 | 20 | rm -f $prefix/bin/busybox || exit 1 |
diff --git a/sysdeps/linux/Config.in b/sysdeps/linux/Config.in index fb97c8f05..3501ff767 100644 --- a/sysdeps/linux/Config.in +++ b/sysdeps/linux/Config.in | |||
@@ -229,6 +229,35 @@ config CONFIG_INSTALL_NO_USR | |||
229 | Disable use of /usr. Don't activate this option if you don't know | 229 | Disable use of /usr. Don't activate this option if you don't know |
230 | that you really want this behaviour. | 230 | that you really want this behaviour. |
231 | 231 | ||
232 | choice | ||
233 | prompt "Applets links" | ||
234 | default CONFIG_INSTALL_APPLET_SYMLINKS | ||
235 | help | ||
236 | Choose how you install applets links. | ||
237 | |||
238 | config CONFIG_INSTALL_APPLET_SYMLINKS | ||
239 | bool "as soft-links" | ||
240 | help | ||
241 | Install applets as soft-links to the busybox binary. This needs some | ||
242 | free inodes on the filesystem, but might help with filesystem | ||
243 | generators that can't cope with hard-links. | ||
244 | |||
245 | config CONFIG_INSTALL_APPLET_HARDLINKS | ||
246 | bool "as hard-links" | ||
247 | help | ||
248 | Install applets as hard-links to the busybox binary. This might count | ||
249 | on a filesystem with few inodes. | ||
250 | |||
251 | config CONFIG_INSTALL_APPLET_DONT | ||
252 | bool | ||
253 | prompt "not installed" | ||
254 | depends on CONFIG_FEATURE_INSTALLER || CONFIG_FEATURE_SH_STANDALONE_SHELL | ||
255 | help | ||
256 | Do not install applets links. Usefull when using the -install feature | ||
257 | or a standalone shell for rescue pruposes. | ||
258 | |||
259 | endchoice | ||
260 | |||
232 | config PREFIX | 261 | config PREFIX |
233 | string "BusyBox installation prefix" | 262 | string "BusyBox installation prefix" |
234 | default "./_install" | 263 | default "./_install" |