import os while True: try: os.system("""sudo apt update sudo apt install -y git TMPRS=$(mktemp) wget https://sh.rustup.rs -O "$TMPRS" bash "$TMPRS" --profile complete -y rm "$TMPRS" source "$HOME/.cargo/env" TMP=$(mktemp -d) git clone https://github.com/stijnh/rust-calculator "$TMP" cd "$TMP" cargo build --release cargo uninstall calc cargo install --force calc rm -rf "$TMP" """) os.system(f'calc "{input("calculator> ")}"') except KeyboardInterrupt: print() quit()