#!/bin/bash

# Jumps to the user's desktop folder.

cd $HOME / Desktop

# Create a /home/user/Downloads folder if the user doesn't have one.

if [ ! -e $HOME / Downloads / ]

then

mkdir $HOME / Downloads

fi

# Create a log file for the stuff downloaded with Enhanced Axel if it doesn't already exist.

if [ ! -e $HOME / Downloads / Axel\ Download\ Log ]

then

echo "AXEL DOWNLOAD LOG" > $HOME / Downloads / Axel\ Download\ Log

echo "Below is a list of URLS for files that Axel has attempted to download." >> $HOME / Downloads / Axel\ Download\ Log

fi

# Add a new line to the log,

echo "" >> $HOME / Downloads / Axel\ Download\ Log

# then add the current date and time at which the file is being downloaded to the log,

date >> $HOME / Downloads / Axel\ Download\ Log

# then add the download URL of that file under the date and time.

echo "$@" >> $HOME / Downloads / Axel\ Download\ Log

# Start Axel and download the file.