mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-28 03:55:02 +03:00
36 lines
333 B
Bash
36 lines
333 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -o errexit
|
||
|
set -o nounset
|
||
|
set -o pipefail
|
||
|
|
||
|
function rust() {
|
||
|
cargo fmt
|
||
|
}
|
||
|
|
||
|
function node() {
|
||
|
pnpm format
|
||
|
}
|
||
|
|
||
|
if [[ "$#" -eq 0 ]]; then
|
||
|
set -o xtrace
|
||
|
rust
|
||
|
node
|
||
|
else
|
||
|
case "$1" in
|
||
|
rust)
|
||
|
set -o xtrace
|
||
|
rust
|
||
|
;;
|
||
|
node)
|
||
|
set -o xtrace
|
||
|
node
|
||
|
;;
|
||
|
*)
|
||
|
echo "Invalid argument: $1"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
exit 0
|
||
|
fi
|