WolverineFan / YNABLinuxInstall

Install script for YNAB 4 on Linux
174 stars 18 forks source link

Download issue, if a previous installation attempt was aborted #13

Closed ElliotFriend closed 9 years ago

ElliotFriend commented 9 years ago

So, I just got around to installing YNAB on my laptop, which had Linux Mint 17 (based on Ubuntu 14.04). The first run-through everything in the script performed fine. However, I had a couple of warnings concerning mono and gecko. I decided to abort the YNAB installation and satisfy those dependencies first. Upon installing them, and trying to re-run the script, I would get the following output:

elliot@ransford ~/Development/YNABLinuxInstall $ perl ./YNAB4_LinuxInstall.pl 
Would you like to:
1. Install YNAB4 and link Dropbox
2. Link Dropbox ONLY
3. Download YNAB4, install it, and link Dropbox
Select an option: [1] 3

Downloading the most current version of YNAB4...
--2014-10-09 12:45:08--  http://www.youneedabudget.com/dev/ynab4/liveCaptive/Win/update.xml
Resolving www.youneedabudget.com (www.youneedabudget.com)... 108.59.3.77
Connecting to www.youneedabudget.com (www.youneedabudget.com)|108.59.3.77|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 525 [application/xml]
Saving to: ‘/tmp/ynab4_update.xml’

100%[====================================================================================================================>] 525         --.-K/s   in 0s      

2014-10-09 12:45:08 (44.3 MB/s) - ‘/tmp/ynab4_update.xml’ saved [525/525]

Use of uninitialized value $UPDATE_LOCATION in open at ./YNAB4_LinuxInstall.pl line 386.
Couldn't open file: No such file or directory at ./YNAB4_LinuxInstall.pl line 20.

At first I thought it was a problem with the download method and tried to utilize LWP over wget, but the same happened.

After I removed the ~/.wine_ynab4 directory, everything went smoothly. I suspect there's a problem when the script can't find the application.xml file to compare versions. Although, I'm a little uncertain why it's giving errors about the $UPDATE_LOCATION value...

ElliotFriend commented 9 years ago

By way of confirmation:

After a successful installation of YNAB4, I renamed application.xml to application-not.xml and received the same error pasted above. I also ran the installation script, without renaming the file, and got a message stating that the most up-to-date version was already installed.

Looks like we need to check if whether or not the application.xml file actually exists before comparing versions...

ElliotFriend commented 9 years ago

Giving an error about the $UPATE_LOCATION value makes perfect sense now. I didn't realize that I had used the save_file_data function within the compare_versions function.ions` function.

WolverineFan commented 9 years ago

Merged