remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/apps/remixdesktop/rundist_tsc.bash

24 lines
604 B

#!/bin/bash
# Read the version from package.json
version=$(awk -F'"' '/"version":/ {print $4}' package.json)
# Determine the command to run based on the version
if [[ $version == *"beta"* ]]; then
command="yarn tscbuild -c beta.json"
elif [[ $version == *"alpha"* ]]; then
command="yarn tscbuild -c alpha.json"
elif [[ $version == *"insiders"* ]]; then
command="yarn tscbuild -c insiders.json"
else
command="yarn tscbuild -c latest.json"
fi
# Append any arguments passed in CLI
for arg in "$@"; do
command+=" $arg"
done
# Print and run the command
echo "Running command: $command"
$command