#!/bin/sh

export XSHAR_REPO=oilshell/oil
export XSHAR_GIT_COMMIT=fd241a771623061ac5a0094e1c44770efafbd363

name=$(basename $0)  # e.g. hello-xshar.xshar
default_dir=/tmp/$name.$$

# User can override this, and then _build/oils.sh can use SKIP_REBUILD to make
# it faster.  Multiple runs without compiling.

export XSHAR_DIR=${XSHAR_DIR:-$default_dir}

change_dir() {
  mkdir -p "$XSHAR_DIR"
  cd "$XSHAR_DIR"
}

extract_data() {
  base64 -d <<'XSHAR_DATA' | tar -x -z
H4sIAEUCvGcAA+08a3PbOJL5rF+BtSdFMiNRtuM8SjtKzuM8xneJ44o9Ozfl9bBoErIYUySPoGxr
t2Z++3U3AJKgKMm5SbJXd0RVLAlsNPqFRqMbzMK/FsMi9xMxSfOZmy0efPm2A+3p/j5+7j57sku/
93Z26BO69veePH6wu//syTP49Wz/8YOd3d3Hj/cfsJ2vQMtSm4vCzxn7FlP9b2xbW1u9uvrZgBXz
PGHTdJZe8YSnc8GSKH7u+iKMWc6znAueFFGasCgpUjblBc81ZG8B1tSA9BG2h9NM8nTGPG8yhwm4
57FolqV5wbIcEEFvEhCkAgv5zeU8ikMXULtIgEdo1Zjkxo/nvK8+vepb0TYcqTKG2+/TcB7DqBMg
PfdnfTZLQxgzKb94Rb/H7tOui0UGiOgDBjFRzNRf/HXN77L83riOEhhyll7zpM9Oo6vER0H12bE/
42eA3lGymS2CLHNnizi61AzF6VWfFf6VuI2KYKrggKQoudIggS8A+7tIFL2ex8Y4pNfrAavsPSyB
H/npYnaZxjbK0RkRvduIgY+YrWXrsMELYC2np9GEZO7CrLbD/jIudeFKTKOS59yPBGcHQvAcNfw6
z9Pctl7fZTwoeMgkeJ9dpQV7KCz2kDA5NDznZIxIu6LC1eAE5AqDB+RuMwcIda57LjYwg8D3ZgWB
782IBJZsRAWfaVbO9GoEtPlmbpSJ9Qjk5xMPHzLJAHWBRUwr05D4mC+QFF4xBgLADrvkG2zRGRlm
qxDXWSCDVXM6BnCcBgBLtmxb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