#! /bin/bash #auto dasm #matt henderson #2014 export DISPLAY=:0 clear echo "Auto DASM/MakeWav" echo "=================" echo "Input (*.asm) files are read from 'asm_input'" echo "Output (*.bin) is sent to 'bin_output'" echo "List files are sent to 'list_output'" echo "Wav files are sent to 'sc_output'" echo echo -n "What is the name of the *.asm file? " read input cd /~/projects/atari2600/assembler/dasm ./dasm /~/projects/atari2600/asm_input/$input.asm -l/~/projects/atari2600/list_output/$input.txt -f3 -v5 -o/~/projects/atari2600/bin_output/$input.bin cd /~/projects/atari2600/assembler/makewav4.2 wine makewav -ts -d2 -f0 /~/projects/atari2600/bin_output/$input.bin mv /~/projects/atari2600/bin_output/$input.wav /~/projects/atari2600/sc_output clear echo "Auto DASM/MakeWav" echo "=================" echo echo "Run '"$input"' in Stella? (lowercase: y/n)" echo read stellarun if [ $stellarun = "y" ] ; then cd /~/projects/atari2600/bin_output stella $input.bin else clear fi
There, nothing special at all, but it saves a lot of typing (as I mentioned, lazy). Also, to avoid having to navigate to the script's folder and typing any prefix to execute the script, you could append the following to bash's rc file (/etc/bash.bashrc) and have the script act as a globally accepted command (I've chosen "asm").
alias asm='sh /~/asm'
Don't forget to logout/login in order to use the new alias for your script.