Mercurial > hg > toybox
view scripts/single.sh @ 1271:c214de62b18b draft
Teach cpio to set uid/gid and timestamp. (Timestamp has year 2100 problem.)
Note that directory timestamps are still sometimes wrong because creating
things in a directory can update the timestamp. Also, cp -r has logic to
ensure we can write to a directory that doesn't have write permission,
cpio does not. This is fixable, but not what existing cpio does.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 29 Apr 2014 06:03:17 -0500 |
parents | 40d0c96a8e89 |
children | ecec71144ddd |
line wrap: on
line source
#!/bin/bash # Build a standalone toybox command if [ -z "$1" ] then echo "usage: single.sh command" >&2 exit 1 fi NAME=$(echo $1 | tr a-z- A-Z_) export KCONFIG_CONFIG=.singleconfig make allnoconfig > /dev/null && sed -i -e "s/\(CONFIG_TOYBOX\)=y/# \1 is not set/" \ -e "s/# CONFIG_\($NAME\|TOYBOX_HELP[^ ]*\) is not set/CONFIG_\1=y/" \ "$KCONFIG_CONFIG" && make && mv toybox $PREFIX$1