-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheyeTrackerAnalyzerEXE.m
29 lines (26 loc) · 1.08 KB
/
eyeTrackerAnalyzerEXE.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function eyeTrackerAnalyzerEXE()
% if ~exist('.git','file')
% %1> nul 2> nul &
% !git init
% !git remote add origin https://github.com/coriumgit/eye-tracker-analyzer &
% !taskkill /F /im "cmd.exe" 1> nul 2> nul &
% end
!break > git_response.txt &
!git fetch --dry-run 1> nul 2> git_response.txt &
!taskkill /F /im "cmd.exe" 1> nul 2> nul &
pause(2.0);
fid = fopen('git_response.txt');
git_fetch_dry_run_res = fgets(fid);
fclose(fid);
if ischar(git_fetch_dry_run_res)
user_response = questdlg('A new version is available. Would you like to update?', 'Update Available', 'Update', 'Skip', 'Cancel', 'Update');
if strcmp(user_response, 'Update')
!git reset --hard origin/master &
!git pull origin master &
!taskkill /F /im "cmd.exe" 1> nul 2> nul &
elseif strcmp(user_response, 'Cancel')
return;
end
end
eyeTrackerAnalyzer();
end