mirror of
https://github.com/libretro/libretro-super
synced 2024-12-26 18:26:06 +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
|
#!/bin/sh
|
||||||
# vim: set ts=3 sw=3 noet ft=sh : bash
|
# vim: set ts=3 sw=3 noet ft=sh : sh
|
||||||
# RetroArch packaging script
|
# RetroArch packaging script for release tarballs
|
||||||
|
|
||||||
PRGNAM=RetroArch
|
PRGNAM=RetroArch
|
||||||
SRCNAM="$(printf %s $PRGNAM | tr '[:upper:]' '[:lower:]')"
|
SRCNAM="$(printf %s $PRGNAM | tr '[:upper:]' '[:lower:]')"
|
||||||
@ -10,7 +10,15 @@ TMP=${TMP:-/tmp/libretro}
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Ensure a clean and fully updated repo
|
# 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
|
./libretro-fetch.sh $SRCNAM
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user