File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed
share/bash-completion/completions Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ main() {
6363 disk=" ${disk% p* } p"
6464 fi
6565
66- if [[ ! -b $disk ]] && [[ $disk != /dev/mapper/loop* ]]; then
66+ if [[ ! -d $disk ]] && [[ ! - b $disk ]] && [[ $disk != /dev/mapper/loop* ]]; then
6767 error " $EXIT_NOT_BLOCK_DEVICE " " $disk "
6868 fi
6969
@@ -91,6 +91,9 @@ main() {
9191 elif [[ -b " $disk " 1 ]]; then
9292 # old armbian image
9393 sudo mount " $disk " 1 " $RSDK_TEMP "
94+ elif [[ -d $disk ]]; then
95+ # actually a rootfs directory
96+ sudo mount --bind " $disk " " $RSDK_TEMP "
9497 else
9598 error " $EXIT_BLKDEV_NO_ROOTDEV " " $disk "
9699 fi
Original file line number Diff line number Diff line change @@ -89,12 +89,13 @@ Requires `systemd-nspawn` (provided by `systemd-container` package in Debian).
8989
9090## Supported target type
9191
92- * Raw block devices (i.e. ordinary disks )
92+ * Raw block device (i.e. ordinary disk )
9393* System image file
9494 * Requires `kpartx` (provided by `multipath-tools` package in Debian)
95+ * Existing rootfs directory
9596
9697Following distributions may be used in addition to `rsdk` image:
97- * `debox -radxa` image
98+ * `debos -radxa` image
9899* `rbuild` image
99100* `rsdk` image
100101* `Armbian` image
Original file line number Diff line number Diff line change @@ -61,11 +61,12 @@ _rsdk_chroot_completions() {
6161 case "$COMP_CWORD" in
6262 2)
6363 local i suggestions=()
64- for i in out/*/output.img \
65- "${COMP_WORDS[COMP_CWORD]%/}"/out/*/output.img \
66- "${COMP_WORDS[COMP_CWORD]%/}"/*/output.img \
67- "${COMP_WORDS[COMP_CWORD]%/}"/output.img; do
68- if [[ -f $i ]]; then
64+ for i in \
65+ out/*/{output.img,rootfs/} \
66+ "${COMP_WORDS[COMP_CWORD]%/}"/out/*/{output.img,rootfs/} \
67+ "${COMP_WORDS[COMP_CWORD]%/}"/*/{output.img,rootfs/} \
68+ "${COMP_WORDS[COMP_CWORD]%/}"/{output.img,rootfs/}; do
69+ if [[ -f "$i" ]] || [[ -d "$i" ]]; then
6970 suggestions+=("$i")
7071 fi
7172 done
You can’t perform that action at this time.
0 commit comments