Skip to content

Commit

Permalink
added quacks to other wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
dmalan committed Nov 23, 2023
1 parent 49ccbd9 commit c0e1bb0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion opt/cs50/bin/http-server
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ normal=$(tput sgr0)

# Check for app.py or wsgi.py
if [[ -f app.py ]] || [[ -f wsgi.py ]]; then
read -p "Are you sure you want to run ${bold}http-server${normal} and not ${bold}flask${normal}? [y/N] " -r
read -p "Quack. Are you sure you want to run ${bold}http-server${normal} and not ${bold}flask${normal}? [y/N] " -r
if [[ ! "${REPLY,,}" =~ ^y|yes$ ]]; then
exit 1
fi
Expand Down
6 changes: 3 additions & 3 deletions opt/cs50/bin/sqlite3
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fi

# If no command-line argument
if [[ $# -eq 0 ]]; then
read -p "Are you sure you want to run ${bold}sqlite3${normal} without a command-line argument (e.g., the filename of a database)? [y/N] " -r
read -p "Quack. Are you sure you want to run ${bold}sqlite3${normal} without a command-line argument (e.g., the filename of a database)? [y/N] " -r
if [[ ! "${REPLY,,}" =~ ^y|yes$ ]]; then
exit 1
fi
Expand All @@ -21,12 +21,12 @@ if [[ $# -eq 0 ]]; then
elif [[ $# -eq 1 ]] && [[ ! "$1" =~ ^- ]]; then
if [[ ! -f "$1" ]]; then
if [[ ! "$1" =~ \.db$ ]]; then
read -p "Are you sure you want to create ${bold}$1${normal}? SQLite filenames usually end in ${bold}.db${normal}. [y/N] " -r
read -p "Quack. Are you sure you want to create ${bold}$1${normal}? SQLite filenames usually end in ${bold}.db${normal}. [y/N] " -r
if [[ ! "${REPLY,,}" =~ ^y|yes$ ]]; then
exit 1
fi
else
read -p "Are you sure you want to create ${bold}$1${normal}? [y/N] " -r
read -p "Quack. Are you sure you want to create ${bold}$1${normal}? [y/N] " -r
if [[ ! "${REPLY,,}" =~ ^y|yes$ ]]; then
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion opt/cs50/bin/valgrind
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Don't run on Python programs
for arg; do
if echo "$arg" | grep -Eq "(^python|\.py$)"; then
echo "Afraid valgrind does not support Python programs!"
echo "Quack. Afraid valgrind does not support Python programs!"
exit 1
fi
done
Expand Down

0 comments on commit c0e1bb0

Please sign in to comment.