Skip to content
Snippets Groups Projects
update.sh 794 B
Newer Older
#!/usr/bin/env bash

set -e

RES_PATH="$(dirname "$0")"

if [ -d "$1" ]
then
    REDOX_PATH="$1"
else
    echo "$0 [path to redox repository]" >&2
    exit 1
fi

set -x

# Update res/base.toml from the redoxer.toml template
cargo run --release --manifest-path "${REDOX_PATH}/installer/Cargo.toml" -- \
    --config="${REDOX_PATH}/config/redoxer.toml" \
    --output-config="${RES_PATH}/base.toml"
sed -i '1s/^/# Automatically generated by update.sh\n\n/' "${RES_PATH}/base.toml"

# Update res/gui.toml from the redoxer-gui.toml template
cargo run --release --manifest-path "${REDOX_PATH}/installer/Cargo.toml" -- \
    --config="${REDOX_PATH}/config/redoxer-gui.toml" \
    --output-config="${RES_PATH}/gui.toml"
sed -i '1s/^/# Automatically generated by update.sh\n\n/' "${RES_PATH}/gui.toml"