diff --git a/scripts/scrpt b/scripts/scrpt index a9d76942..4a387260 100755 --- a/scripts/scrpt +++ b/scripts/scrpt @@ -1,6 +1,12 @@ #!/usr/bin/env bash filename=$1 + +if [[ -f "$filename" ]]; then + echo "File: $filename already exists." + exit 1 +fi + touch "$filename" chmod +x "$filename" -echo "#!/usr/bin/env bash" >> "$filename" +echo "#!/usr/bin/env bash" >>"$filename" \ No newline at end of file