2023-07-21 10:45:07 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# shellcheck disable=SC1091
|
2022-08-16 16:39:08 -04:00
|
|
|
|
2023-07-21 10:45:07 -04:00
|
|
|
exists() { type -t "$1" &> /dev/null; }
|
2022-08-16 16:39:08 -04:00
|
|
|
|
2022-10-06 16:15:41 -04:00
|
|
|
export APP_NAME="VSCodium"
|
2022-08-29 15:56:51 -04:00
|
|
|
export CI_BUILD="no"
|
|
|
|
export OS_NAME="linux"
|
|
|
|
export SHOULD_BUILD="yes"
|
2022-10-06 16:15:41 -04:00
|
|
|
export SKIP_ASSETS="yes"
|
2022-08-29 15:56:51 -04:00
|
|
|
export VSCODE_LATEST="no"
|
|
|
|
export VSCODE_QUALITY="stable"
|
|
|
|
|
|
|
|
while getopts ":ilp" opt; do
|
|
|
|
case "$opt" in
|
|
|
|
i)
|
|
|
|
export VSCODE_QUALITY="insider"
|
|
|
|
;;
|
|
|
|
l)
|
|
|
|
export VSCODE_LATEST="yes"
|
|
|
|
;;
|
|
|
|
p)
|
2023-07-21 10:45:07 -04:00
|
|
|
export SKIP_ASSETS="no"
|
|
|
|
;;
|
|
|
|
*)
|
2022-08-29 15:56:51 -04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2022-08-16 16:39:08 -04:00
|
|
|
|
|
|
|
if ! exists yarn; then
|
|
|
|
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
|
|
|
sudo apt-get install -y nodejs desktop-file-utils
|
|
|
|
|
|
|
|
npm install -g yarn
|
|
|
|
fi
|
|
|
|
|
|
|
|
UNAME_ARCH=$( uname -m )
|
|
|
|
|
|
|
|
if [[ "${UNAME_ARCH}" == "x86_64" ]]; then
|
|
|
|
export VSCODE_ARCH="x64"
|
|
|
|
else
|
|
|
|
export npm_config_arch=armv7l
|
|
|
|
export npm_config_force_process_config="true"
|
|
|
|
export VSCODE_ARCH="armhf"
|
|
|
|
fi
|
|
|
|
|
2022-08-30 07:55:17 -04:00
|
|
|
echo "OS_NAME=\"${OS_NAME}\""
|
2022-10-06 16:15:41 -04:00
|
|
|
echo "SKIP_ASSETS=\"${SKIP_ASSETS}\""
|
2022-08-30 07:55:17 -04:00
|
|
|
echo "VSCODE_ARCH=\"${VSCODE_ARCH}\""
|
|
|
|
echo "VSCODE_LATEST=\"${VSCODE_LATEST}\""
|
|
|
|
echo "VSCODE_QUALITY=\"${VSCODE_QUALITY}\""
|
2022-08-29 15:56:51 -04:00
|
|
|
|
|
|
|
rm -rf vscode* VSCode*
|
2022-08-16 16:39:08 -04:00
|
|
|
|
|
|
|
. get_repo.sh
|
2022-08-29 15:56:51 -04:00
|
|
|
. build.sh
|
2022-08-16 16:39:08 -04:00
|
|
|
|
2022-10-06 16:15:41 -04:00
|
|
|
if [[ "${SKIP_ASSETS}" == "no" ]]; then
|
|
|
|
. prepare_assets.sh
|
2022-08-29 15:56:51 -04:00
|
|
|
fi
|