Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #19 #21

Merged
merged 2 commits into from Oct 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 21 additions & 1 deletion run.sh
Expand Up @@ -2,13 +2,33 @@

set -e

not_suggested_path=(
'/volumes/'
'/mnt/'
'/media/'
)
proceed=true
current_directory=`pwd`

echo -e "\033[0;32mHello! This script will generate a build folder containing a copy of VVV with instructions and installers.\033[0m"
echo -e "\033[0;32mOnce this script finishes succesfully, you can copy the contents of the build folder on to USB drives!\033[0m"
echo ""
echo -e "\033[0;33mPrior warning, this script takes a while to run, don't be surprised if it's 1 hour+\033[0m"
echo -e "\033[0;33mAlso, do not run this on a USB drive. Run it on an SSD then copy the final result\033[0m"
for path in "${not_suggested_path[@]}" ; do
if [[ $current_directory = *$path* ]]; then
read -p "You are trying run this on a USB drive, it is better for performance and avoid errors to run on HDD/SSD drive. Do you want to proceed anyway?" -n 1 -r
proceed=false
if [[ $REPLY =~ ^[Yy]$ ]]; then
proceed=true
fi
fi
done
echo ""

if [[ ! $proceed ]]; then
exit
fi

total=21
counter=1
if [ -d "resources" ]; then
Expand Down