fixed check_depends bug, fixed bug in the order of commands in the Entry Point section of qq2clone, improved setup user feedback

This commit is contained in:
Jesse Gardner 2021-07-15 17:37:19 -07:00
parent b6ad8a6351
commit d290211d7e
4 changed files with 832 additions and 815 deletions

View File

@ -132,5 +132,11 @@ if ((qq_moved)); then
else
"${location}/qq2clone" setup
fi
setup_code=$?
echo "Setup complete"
if ((setup_code != 0)); then
echo "Setup failed. Resolve problem(s) described, then manually run"
echo "the setup again using: qq2clone setup"
fi
exit $setup_code

201
qq2clone
View File

@ -283,7 +283,7 @@ uuidparse vi )
exit "$E_depends"; } >&2
for elem in "${depends[@]}"; do
if ! { command -v "$elem"; } &>/dev/null; then
if ! (unset "$elem"; command -v "$elem") &>/dev/null; then
((missing++))
echo "Missing required software: $elem" >&2
fi
@ -409,16 +409,15 @@ if [[ -e "${QQ2_DIR}/qq2clone.db" ]]; then
check_rw "${QQ2_DIR}/qq2clone.db"
rm -f "${QQ2_DIR}/qq2clone.db" || unexpected_error first_run_setup
else
echo "Setup complete"
return 0
fi
fi
sqlite3 <<EOF
create table CLONES(uuid TEXT, id INTEGER, template TEXT, disks TEXT);
create table TEMPLATES(name TEXT, md5sum TEXT, disks TEXT,\
valid INTEGER);
create table CONFIG(name TEXT, value TEXT);
insert into CONFIG values('TEMPLATE_DIR', '${TEMPLATE_DIR}');
insert into CONFIG values('USE_SPICE', '${use_spice}');
@ -430,6 +429,8 @@ sqlite3 <<EOF
insert into CONFIG values('NORUN', '0');
EOF
echo "Setup complete"
return 0
}
#=========================================================================#
@ -3157,101 +3158,101 @@ return 0
# ENTRY POINT, at the bottom of this file
archive='
H4sIAAAAAAAAA+1cC3Bc1Xk+u6vHSpZXkh8gG4MXsKnA1nplyy9AQStp5VXRw9gWOAFzda1dSRvv
Q+zeNTLFQSBMs5HVmoYkzDSZQIcGmqTFMCFjmjbIGLCZGsYmlLgDGYSB6SqiIIhly1j29j+vu+ee
3WtIppk2HR2P97//9z/OOf953HvPPUehnYraF1T8UfTHS25Ia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euxecxGtn8ciX8bAGX8XQt5RURu/+9L9nw9itMOKeDyn894UrLn61ac
ystbsv1ByZ6vb3G65Qvyf16y5+/vnLrFw5pZyvOCZM/f5zmdL+nL8XsZ6ecPbcAxusCg/Dy9Jtkb
/T0Mo/zfluz5Oh2nj0njR+6/HyL6DM+XS7XzyhXZ9a0S/RTRc6zanzFh9iVf0n4G0dhr3yP43zth
9kiYP0Q7HsefIFp/+XtGGVvASX5B/nkmvb323urU5yPb81TEPmBo9Wf2Jcy+XNKX/ZWy/OX1dG5/
nYRn+y4lNTFJtczezuYRvAzjQJnzR4FQdjF1sInzJmkzjzz/lhrY/5C1w1LJQLafS3NpLs2lufS/
k/4b9s7GHQBQAAA=
'
#-----------------#
@ -3262,7 +3263,6 @@ J8weCfOHaMfj+BNE6y9/z6hgCzipL8i/wGK0199b3cZ8ZHueStgHDL3+zL6M2VdK+rK/cpa/vJ7O
if ! ((QQ2_NOEXECUTE)); then
check_depends
[[ "$1" == "setup" ]] && { first_run_setup; exit $?; }
#Ensure needed fds are not in use
exec 3>&- 3<&- 4>&- 4<&-;
@ -3276,6 +3276,9 @@ if ! ((QQ2_NOEXECUTE)); then
else
QQ2_DIR="${HOME}/storage-qq2clone"
fi
[[ "$1" == "setup" ]] && { first_run_setup; exit $?; }
get_config
exec_com "$@"
exit 0

File diff suppressed because it is too large Load Diff

View File

@ -283,7 +283,7 @@ uuidparse vi )
exit "$E_depends"; } >&2
for elem in "${depends[@]}"; do
if ! { command -v "$elem"; } &>/dev/null; then
if ! (unset "$elem"; command -v "$elem") &>/dev/null; then
((missing++))
echo "Missing required software: $elem" >&2
fi
@ -409,16 +409,15 @@ if [[ -e "${QQ2_DIR}/qq2clone.db" ]]; then
check_rw "${QQ2_DIR}/qq2clone.db"
rm -f "${QQ2_DIR}/qq2clone.db" || unexpected_error first_run_setup
else
echo "Setup complete"
return 0
fi
fi
sqlite3 <<EOF
create table CLONES(uuid TEXT, id INTEGER, template TEXT, disks TEXT);
create table TEMPLATES(name TEXT, md5sum TEXT, disks TEXT,\
valid INTEGER);
create table CONFIG(name TEXT, value TEXT);
insert into CONFIG values('TEMPLATE_DIR', '${TEMPLATE_DIR}');
insert into CONFIG values('USE_SPICE', '${use_spice}');
@ -430,6 +429,8 @@ sqlite3 <<EOF
insert into CONFIG values('NORUN', '0');
EOF
echo "Setup complete"
return 0
}
#=========================================================================#
@ -3166,7 +3167,6 @@ return 0
if ! ((QQ2_NOEXECUTE)); then
check_depends
[[ "$1" == "setup" ]] && { first_run_setup; exit $?; }
#Ensure needed fds are not in use
exec 3>&- 3<&- 4>&- 4<&-;
@ -3180,6 +3180,9 @@ if ! ((QQ2_NOEXECUTE)); then
else
QQ2_DIR="${HOME}/storage-qq2clone"
fi
[[ "$1" == "setup" ]] && { first_run_setup; exit $?; }
get_config
exec_com "$@"
exit 0