When executing install.shline 67 and line 69 assume the current directory is the same as the file todo.py resulting in a file not found error.
Proposed changes:
#!/bin/bash
INSTALL_DIR=$HOME/bin
ALIAS_FILE=$HOME/.bashrc
THIS_SCRIPT=$(readlink -f $0) # Added to get full path to install.sh
CODE_DIR=$(dirname $THIS_SCRIPT) # Added to get full dirname of install.sh
prog="[""$(basename $THIS_SCRIPT)""] "
and
echo $prog"Copying todo.py to $INSTALL_DIR/todo.py"
if [[ ! -f $INSTALL_DIR/todo.py ]] ; then
# addition of full path via CODE_DIR variable
cp ${CODE_DIR}/todo.py $INSTALL_DIR
else
# addition of full path via CODE_DIR variable
cp -u ${CODE_DIR}/todo.py $INSTALL_DIR
fi
When executing
install.sh
line 67 and line 69 assume the current directory is the same as the filetodo.py
resulting in a file not found error.Proposed changes:
and
Thoughts?