26 lines
555 B
Bash
Executable file
26 lines
555 B
Bash
Executable file
#!/bin/bash -e
|
|
|
|
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
|
|
|
|
export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
export IMG_NAME='raspberrypi'
|
|
export USERNAME='user'
|
|
export PASSWORD='password'
|
|
|
|
if [ -f "$BASE_DIR/config.sh" ]; then
|
|
source "$BASE_DIR/config.sh"
|
|
fi
|
|
|
|
export DEPLOY_DIR="$BASE_DIR/deploy"
|
|
export ROOTFS_DIR="$BASE_DIR/rootfs"
|
|
export KEYS_DIR="$BASE_DIR/keys"
|
|
export FILES_DIR="$BASE_DIR/files"
|
|
|
|
export IMG_FILE="$DEPLOY_DIR/$IMG_NAME.img"
|
|
|
|
cd "$BASE_DIR"
|
|
|
|
mkdir -p "$DEPLOY_DIR"
|
|
|
|
exec bash -e $@
|