mirror of
https://github.com/ggrandou/abootimg.git
synced 2024-11-23 09:53:32 +08:00
pack-initrd: use -f to overwrite initrd
This commit is contained in:
parent
a51d2f237a
commit
075d1b38f0
@ -1,6 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
if [ "$1" = "-f" ]; then
|
||||
forcewrite=yes
|
||||
shift
|
||||
fi
|
||||
|
||||
initrd=${1:-initrd.img}
|
||||
ramdisk=${2:-ramdisk}
|
||||
|
||||
@ -9,7 +14,7 @@ if [ ! -d $ramdisk ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f $initrd ]; then
|
||||
if [ -f $initrd -a -z "$forcewrite" ]; then
|
||||
echo "$initrd already exist."
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user