Add a desktop file and a bundler #60
|
@ -3,3 +3,4 @@ target
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
result
|
result
|
||||||
|
*.tgz
|
||||||
|
|
15
build.sh
15
build.sh
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
set -x
|
||||||
|
|
||||||
RUST_ALL_TARGETS=(
|
RUST_ALL_TARGETS=(
|
||||||
"dashboard"
|
"dashboard"
|
||||||
|
@ -27,6 +28,16 @@ build_rust_targets() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build_dist() {
|
||||||
|
local TARGETS=${@/$CMD}
|
||||||
|
|
||||||
|
for target in $TARGETS; do
|
||||||
|
if [ -f $target/dist.sh ]; then
|
||||||
|
cd $target && ./dist.sh
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
export CARGO=`which cargo`
|
export CARGO=`which cargo`
|
||||||
|
|
||||||
if [ -z "${TARGET-}" ]; then
|
if [ -z "${TARGET-}" ]; then
|
||||||
|
@ -43,7 +54,9 @@ if [ "${CMD}" == "clean" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for cmd in $CMD; do
|
for cmd in $CMD; do
|
||||||
if [ "${TARGET}" == "all" ]; then
|
if [ "${CMD}" == "dist" ]; then
|
||||||
|
build_dist $TARGET
|
||||||
|
elif [ "${TARGET}" == "all" ]; then
|
||||||
build_rust_targets $cmd ${RUST_ALL_TARGETS[*]}
|
build_rust_targets $cmd ${RUST_ALL_TARGETS[*]}
|
||||||
else
|
else
|
||||||
build_rust_targets $cmd $TARGET
|
build_rust_targets $cmd $TARGET
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Version=1.0
|
||||||
|
Name=dashboard
|
||||||
|
Comment=My personal system dashboard
|
||||||
|
Exec=dashboard
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
set -x
|
||||||
|
|
||||||
|
mkdir -p dist
|
||||||
|
cp dashboard.desktop dist
|
||||||
|
cp ../target/release/dashboard dist
|
||||||
|
strip dist/dashboard
|
||||||
|
tar -cf dashboard.tgz dist/
|
||||||
|
|
Loading…
Reference in New Issue