Remove dependency checks
This commit is contained in:
parent
fbd363a741
commit
d9aa8945a8
3 changed files with 0 additions and 45 deletions
|
@ -29,9 +29,6 @@ apt-get install bash quilt parted qemu-user-static debootstrap zerofree \
|
|||
dosfstools libcap2-bin grep rsync
|
||||
```
|
||||
|
||||
The file `depends` contains a list of tools needed. The format of this
|
||||
file is `<tool>[:<debian-package>]`.
|
||||
|
||||
|
||||
|
||||
Build
|
||||
|
|
10
depends
10
depends
|
@ -1,10 +0,0 @@
|
|||
bash
|
||||
quilt
|
||||
parted
|
||||
qemu-debootstrap:qemu-user-static
|
||||
debootstrap
|
||||
zerofree
|
||||
mkdosfs:dosfstools
|
||||
capsh:libcap2-bin
|
||||
grep
|
||||
rsync
|
32
run
32
run
|
@ -17,38 +17,6 @@ export IMG_DATE="$(date +%Y-%m-%d)"
|
|||
|
||||
export IMG_FILE="$DEPLOY_DIR/$IMG_NAME-${IMG_DATE}.img"
|
||||
|
||||
# dependencies_check
|
||||
# $@ Dependnecy files to check
|
||||
#
|
||||
# Each dependency is in the form of a tool to test for, optionally followed by
|
||||
# a : and the name of a package if the package on a Debian-ish system is not
|
||||
# named for the tool (i.e., qemu-user-static).
|
||||
dependencies_check() {
|
||||
local missing
|
||||
|
||||
if [[ -f "$1" ]]; then
|
||||
for dep in $(cat "$1"); do
|
||||
if ! hash ${dep%:*} 2>/dev/null; then
|
||||
missing="${missing:+$missing }${dep#*:}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "$missing" ]]; then
|
||||
tput setaf 1 # Red color
|
||||
echo 'Reqired dependencies not installed.'
|
||||
echo 'This can be resolved on Debian/Raspbian systems by installing the following packages:'
|
||||
for package_name in $missing; do
|
||||
echo " * $package_name"
|
||||
done
|
||||
tput sgr0 # No color
|
||||
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
dependencies_check "$BASE_DIR/depends"
|
||||
|
||||
cd "$BASE_DIR"
|
||||
|
||||
mkdir -p "$DEPLOY_DIR"
|
||||
|
|
Reference in a new issue