# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/helix/helix.conf # Copyright (C) 2022 - 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- cargoinstopt= HELIX_ENV="$datadir/share/helix" HELIX_RUNTIME="$HELIX_ENV/runtime" HELIX_GRAMMAR="$HELIX_RUNTIME/grammars" preinstall() { echo "Deleting old install" rm -rf $HELIX_ENV mkdir -p $HELIX_ENV/bin mkdir -p $HELIX_RUNTIME mkdir -p $HELIX_GRAMMAR echo "Copying to $HELIX_ENV" cp target/release/hx $HELIX_ENV/bin/ cp -r "runtime/themes" "$HELIX_RUNTIME" cp -r "runtime/queries" "$HELIX_RUNTIME" find "runtime/grammars" -name '*.so' -exec cp {} $HELIX_GRAMMAR/ \; cp runtime/tutor $HELIX_RUNTIME echo "Creating a runtime shim" echo "HELIX_RUNTIME=$HELIX_RUNTIME $HELIX_ENV/bin/hx \"\${@}\"" > $root$bindir/hx chmod +x $root$bindir/hx } hook_add postmake 2 preinstall