1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
raspberrypi-build/build.sh

43 lines
961 B
Bash
Raw Normal View History

2016-04-11 02:21:07 -04:00
#!/bin/bash -e
2017-07-02 20:52:41 -04:00
export IMG_NAME='BarnacleOS'
export HOSTNAME='barnacleos'
export USERNAME='user'
export PASSWORD='password'
2017-07-02 07:07:37 -04:00
export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2017-07-02 07:08:24 -04:00
export SCRIPT_DIR="$BASE_DIR/scripts"
2017-07-02 07:37:33 -04:00
export FUNCTIONS_DIR="$BASE_DIR/functions"
2017-07-02 07:08:24 -04:00
export DEPLOY_DIR="$BASE_DIR/deploy"
2017-07-02 20:17:20 -04:00
export ROOTFS_DIR="$BASE_DIR/rootfs"
2017-07-02 20:24:50 -04:00
export MOUNT_DIR="$BASE_DIR/mnt"
2017-07-02 07:07:37 -04:00
2017-07-02 20:55:48 -04:00
export IMG_DATE="$(date +%Y-%m-%d)"
2017-07-02 09:18:10 -04:00
2017-07-02 20:55:48 -04:00
export IMG_FILE="$DEPLOY_DIR/$IMG_DATE-${IMG_NAME}.img"
export ZIP_FILE="$DEPLOY_DIR/$IMG_DATE-${IMG_NAME}.zip"
2017-07-02 14:01:01 -04:00
2017-07-02 07:07:37 -04:00
export QUILT_NO_DIFF_INDEX=1
export QUILT_NO_DIFF_TIMESTAMPS=1
2017-07-02 07:10:54 -04:00
export QUILT_REFRESH_ARGS='-p ab'
2017-07-02 07:07:37 -04:00
2017-07-02 21:04:47 -04:00
source "$FUNCTIONS_DIR/logging.sh"
source "$FUNCTIONS_DIR/dependencies_check.sh"
source "$SCRIPT_DIR/common.sh"
2017-07-03 00:31:03 -04:00
source "$SCRIPT_DIR/patching.sh"
2017-07-02 21:04:47 -04:00
2017-07-03 02:28:10 -04:00
if [ "$(id -u)" != '0' ]; then
echo 'Please run as root' 1>&2
exit 1
fi
2017-07-02 20:56:30 -04:00
2017-07-03 02:28:10 -04:00
dependencies_check "$BASE_DIR/depends"
2017-07-02 20:58:19 -04:00
2017-07-03 02:28:10 -04:00
mkdir -p "$DEPLOY_DIR"
mkdir -p "$MOUNT_DIR"
2017-07-02 07:07:37 -04:00
2017-07-03 02:40:57 -04:00
cd "$BASE_DIR"
2017-07-02 07:30:26 -04:00
2017-07-03 02:40:57 -04:00
./run.sh