mirror of
https://github.com/damus-io/notedeck.git
synced 2024-09-19 13:16:34 +00:00
aacc41e4c2
Since the is_mobile check was moved to compile-time instead of runtime
in 0a6a441041
, we need a way to override
the check when previewing using the 'mobile' flag.
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
21 lines
476 B
Bash
Executable File
21 lines
476 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
MOBILE_FLAG=0
|
|
FILTERED_ARGS=()
|
|
|
|
# Loop through the command line arguments
|
|
for arg in "$@"; do
|
|
if [[ "$arg" == "--mobile" ]]; then
|
|
MOBILE_FLAG=1
|
|
else
|
|
# Add non '--mobile' arguments to the filtered list
|
|
FILTERED_ARGS+=("$arg")
|
|
fi
|
|
done
|
|
|
|
if [[ "$MOBILE_FLAG" -eq 1 ]]; then
|
|
cargo run --bin ui_preview --features emulate_mobile --release -- "${FILTERED_ARGS[@]}"
|
|
else
|
|
cargo run --bin ui_preview --release -- "$@"
|
|
fi
|