kanidm/scripts/install_ubuntu_dependencies.sh
James Hodgkinson cc1cc691f3
Started chasing noise, found some code to delete... (#1768)
logging changes:

* Offering auth mechanisms -> debug
* 404's aren't really warnings
* double tombstone message, one goes to debug

other changes:

* CSP changes to allow the bootstrap images to load
* more testing javascriptfile things, I R 
* it's nice to know where things are
* putting non-rust web things in static/ instead of src/
* RequestCredentials::SameOrigin is the default, also adding a utility function to save dupe code. Wow this saved... kilobytes.
* removing commented code, fixing up codespell config
* clippyisms
* wtf, gha
* dee-gloo-ing some things
* adding some ubuntu build test things
* sigh rustwasm/wasm-pack/issues/1138
* more do_request things
* packaging things
* hilarious dev env setup script
* updated script works, all the UI works, including the experimental UI for naughty crabs
* deb package fixes
* fixed some notes
* setup experimental UI tweaks
2023-06-27 11:38:22 +10:00

61 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
set -e
if [ "$(whoami)" == "root" ]; then
SUDOCMD=""
else
SUDOCMD="sudo "
fi
${SUDOCMD} apt-get update &&
${SUDOCMD} apt-get install -y \
libpam0g-dev \
libudev-dev \
libssl-dev \
libsqlite3-dev \
pkg-config \
curl \
rsync \
build-essential
if [ -z "$(which cargo)" ]; then
if [ -f "$HOME/.cargo/env" ]; then
#shellcheck disable=SC1091
source "$HOME/.cargo/env"
elif [ "${INSTALL_RUST}" == "1" ]; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
#shellcheck disable=SC1091
source "$HOME/.cargo/env"
fi
fi
ERROR=0
if [ -z "$(which cargo)" ]; then
echo "You don't have cargo / rust installed!"
echo "Go to <https://www.rust-lang.org/tools/install> for instructions!"
echo ""
echo "Or run this script with INSTALL_RUST=1 to install it for you."
ERROR=1
fi
if [ $ERROR -eq 0 ] && [ -z "$(which wasm-pack)" ]; then
echo "You don't have wasm-pack installed! Installing it now..."
cargo install wasm-pack
fi
if [ $ERROR -eq 0 ] && [ -z "$(which wasm-bindgen)" ]; then
echo "You don't have wasm-bindgen installed! Installing it now..."
cargo install -f wasm-bindgen-cli
fi
if [ $ERROR -eq 1 ]; then
exit 1
fi
echo "Woo, all ready to go!"
#shellcheck disable=SC2016
echo 'You might need to load the env: source "$HOME/.cargo/env"'