fix a typo: oclHashcat64.sh is of course not a directory
[hashcat.git] / extra / tab_completion / install
index 26c2f53..854b05c 100755 (executable)
@@ -94,7 +94,9 @@ is_child=0
 
 if ! is_root; then
 
-   sudo ${BASH_SOURCE[0]} ${was_sourced}
+  echo "Warning: root permissions are required to install the tab completion script into the protected '${COMPGENFOLDER}' folder"
+
+  sudo ${BASH_SOURCE[0]} ${was_sourced}
 
   ret=${?}
 
@@ -129,6 +131,10 @@ fi
 
 if [ -d "${COMPGENFOLDER}" ]; then
 
+  # remove the old version of oclHashcat64.sh (was renamed to just oclHashcat.sh)
+
+  rm -f "${COMPGENTARGET}"/oclHashcat64.sh
+
   # copy the script to target folder
 
   cp ${ROOT}/oclHashcat.sh "${COMPGENTARGET}"