Preinstall prompt more readable

This commit is contained in:
Mark Cooper 2021-09-25 14:14:22 -05:00
parent ca9521ac9a
commit b5e83d8866
2 changed files with 12 additions and 5 deletions

View File

@ -53,24 +53,30 @@ should_build_config() {
setup_config() { setup_config() {
if should_build_config; then if should_build_config; then
echo "Alright then, let's setup a new config." echo "Okay, let's setup a new config."
AUDIOBOOK_PATH="" AUDIOBOOK_PATH=""
read -p "Enter path for your audiobooks [Default: $DEFAULT_AUDIOBOOK_PATH]: " AUDIOBOOK_PATH read -p "
Enter path for your audiobooks [Default: $DEFAULT_AUDIOBOOK_PATH]:
" AUDIOBOOK_PATH
if [[ -z "$AUDIOBOOK_PATH" ]]; then if [[ -z "$AUDIOBOOK_PATH" ]]; then
AUDIOBOOK_PATH="$DEFAULT_AUDIOBOOK_PATH" AUDIOBOOK_PATH="$DEFAULT_AUDIOBOOK_PATH"
fi fi
DATA_PATH="" DATA_PATH=""
read -p "Enter path for data files, i.e. streams, downloads, database [Default: $DEFAULT_DATA_PATH]: " DATA_PATH read -p "
Enter path for data files, i.e. streams, downloads, database [Default: $DEFAULT_DATA_PATH]:
" DATA_PATH
if [[ -z "$DATA_PATH" ]]; then if [[ -z "$DATA_PATH" ]]; then
DATA_PATH="$DEFAULT_DATA_PATH" DATA_PATH="$DEFAULT_DATA_PATH"
fi fi
PORT="" PORT=""
read -p "Port for the web ui [Default: $DEFAULT_PORT]: " PORT read -p "
Port for the web ui [Default: $DEFAULT_PORT]:
" PORT
if [[ -z "$PORT" ]]; then if [[ -z "$PORT" ]]; then
PORT="$DEFAULT_PORT" PORT="$DEFAULT_PORT"

View File

@ -8,7 +8,7 @@ cd "$SCRIPT_DIR/.."
# Get package version without double quotes # Get package version without double quotes
VERSION="$( eval echo $( jq '.version' package.json) )" VERSION="$( eval echo $( jq '.version' package.json) )"
OUTPUT_FILE="audiobookshelf_${VERSION}_amd64" OUTPUT_FILE="audiobookshelf_${VERSION}_amd64.deb"
echo ">>> Building Client" echo ">>> Building Client"
echo "--------------------" echo "--------------------"
@ -33,5 +33,6 @@ pkg -t node12-linux-x64 -o build/debian/usr/share/audiobookshelf/audiobookshelf
fakeroot dpkg-deb --build build/debian fakeroot dpkg-deb --build build/debian
mv build/debian.deb "build/$OUTPUT_FILE" mv build/debian.deb "build/$OUTPUT_FILE"
chmod +x "build/$OUTPUT_FILE"
echo "Finished! Filename: $OUTPUT_FILE" echo "Finished! Filename: $OUTPUT_FILE"