I have decide to take on the task of learning Assembly programming and while bored one night I decided to write a little script to help compile and build my Assembly source files. What I am asking of you fine folks is to help me out, show me what I have done wrong, what i could improve and maybe some new ideas for the script?
Here is my script
Code:
#!/bin/bash
#: Title :asm2exe (Assembly to Executable)
#: Date :(C)2013
#: Author :lancelot
#: Version :1.0
#: Description :A small script to compile and build .asm files with ease.
#: Options :
#!/bin/bash
echo " _____ __ __ ___ ________ ________
/\ / ____| \/ |__ \| ____\ \ / / ____|
/ \ | (___ | \ / | ) | |__ \ V /| |__
/ /\ \ \___ \| |\/| | / /| __| > < | __|
/ ____ \ ____) | | | |/ /_| |____ / . \| |____
/_/ \_\_____/|_| |_|____|______/_/ \_\______|" #display ascii art logo
echo #skip a line
echo #skip a line
echo "This is a program to make compiling"
echo " and building your .asm files a breeze!\c" #display message to user
echo #skip a line
echo "Enter the name of the file you would like to compile"
echo "(Please use the full path if it applies):" #prompt user to enter filename
read filename #read input and save it in filename
echo "You want to compile $filename, correct? (y/n)" #prompt user again to be sure
read answer
if test "$answer" = y
then
echo #skip a line
echo "Compilation will begin shortly..." #display message to user
nasm -f elf $filename #begin building process
echo "Ready to begin with step 2!"
echo "Please enter the new file name" #prompt user for .o file
read file2
echo "\n"
echo "Finalizing compilation..."
gcc $file2 -o final
else
echo "Please re-enter the name of the file you would like to use: " #prompt user to re-enter initial file name
read filename #re-check user input
fi
echo "Your file is ready!"
echo "Thank you for using asm2exe"
exit 0