mirror of
https://github.com/libretro/libretro-super
synced 2024-12-25 15:20:40 +00:00
retroarch-release.sh: Ask before removing the directory.
Someone might run this script without realizing what it does.
This commit is contained in:
parent
28e3515ad4
commit
c0d48cfd25
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# vim: set ts=3 sw=3 noet ft=sh : bash
|
||||
# RetroArch packaging script
|
||||
# vim: set ts=3 sw=3 noet ft=sh : sh
|
||||
# RetroArch packaging script for release tarballs
|
||||
|
||||
PRGNAM=RetroArch
|
||||
SRCNAM="$(printf %s $PRGNAM | tr '[:upper:]' '[:lower:]')"
|
||||
@ -10,7 +10,15 @@ TMP=${TMP:-/tmp/libretro}
|
||||
set -eu
|
||||
|
||||
# Ensure a clean and fully updated repo
|
||||
[ -d $SRCNAM ] && rm -rf -- $SRCNAM
|
||||
if [ -d $SRCNAM ]; then
|
||||
printf %s\\n "WARNING: The $PRGNAM directory already exists." \
|
||||
"Remove the $PRGNAM directory and continue? (y/n)" >&2
|
||||
read -r answer
|
||||
case "$answer" in
|
||||
[yY]|[yY][eE][sS] ) rm -rf -- $SRCNAM ;;
|
||||
* ) printf %s\\n 'Exiting ...'; exit 0 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
./libretro-fetch.sh $SRCNAM
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user