Thank you for the bug report and fix. I will check and update the wiki.

Actually I originally intended to do bin/install-usr.sh, but later changed
my mind and run at the ~bin folder.


On Sun, 16 Jan 2022 at 4:20 PM Michail L. Liarmakopoulos <
[email protected]> wrote:

> Hello all,
>
> I think I've found a small mistake/bug in the installation instructions of
> j903 at the page https://code.jsoftware.com/wiki/System/Installation/J903.
> Maybe you should change this, if you agree. What follows is my setup, what
> I did, and what error I got.
>
> Also, I'd like to mention here that this is about installing j903 from the
> binaries (https://code.jsoftware.com/wiki/System/Installation/J903/Zips),
> and not
> building the source from the github repository.
>
> That being said, I managed to install j903 after all, but simply without
> following your directions, sorry to say.
>
> ## My setup
>
> milia@Newton:~$ ijconsole
>    JVERSION
> Engine: j903/j64/linux
> Release-a: commercial/2021-12-16T15:14:55
> Library: 9.03.08
> Platform: Linux 64
> Installer: unknown
> InstallPath: /usr/share/j/9.03
> Contact: www.jsoftware.com
>
> ## What I did and it failed
>
> I followed exactly the instructions:
>
> ```bash
> $ cd ~/path/to/my/j903
> $ sudo bin/install-usr.sh # copy files to /usr
> ```
>
> But then, I got the error:
>
> ```
> milia@Newton:~/Documents/dev/j/j903$ sudo bin/install-usr.sh
> this script will install j system on /usr
> 1
> 2
> directory not j903
> ```
> I had added at some debugging points of the `install-usr.sh` using echo
> statements to see where it breaks.
>
> Well it breaks at this line:
>
> ```bash
> [ "j903" = ${PWD##*/} ] || { echo "directory not j903" ; exit 1; }
> ```
> The reason for this is that because before this command it has the `cd ..`,
> the script gets out of the directory `j903/` and so it fails in the first
> check.
>
> For this reason, I understood that what I had to do was to run the shell
> script from within the `j903/bin/` folder.
>
> Doing so, it worked as it passed all the checkpoints as you can see too:
>
> ```
> milia@Newton:~/Documents/dev/j/j903/bin$ sudo ./install-usr.sh
> this script will install j system on /usr
> 1
> 2
> /home/milia/Documents/dev/j/j903/bin
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> done
> ```
>
> Also if I do a `ll /usr/bin/*jconsole*` I get:
>
> ```
> milia@Newton:~/Documents/dev/j/j903/bin$ ll /usr/bin/*jconsole*
> lrwxrwxrwx 1 root root    14 Jan 16 08:30 /usr/bin/ijconsole ->
> ijconsole-9.03
> -rwxr-xr-x 1 root root 49056 Dec  9  2020 /usr/bin/ijconsole-9.02
> -rwxr-xr-x 1 root root 48088 Jan 16 08:30 /usr/bin/ijconsole-9.03
> -rwxr-xr-x 1 root root    42 Jan 16 08:30 /usr/bin/ijconsole.sh
> lrwxrwxrwx 1 root root    26 Feb  8  2019 /usr/bin/jconsole ->
> /etc/alternatives/jconsole
> ```
>
> So all look good, regarding this minor bug.
>
> ## Suggested fix
>
> So, it's not that big of a deal, but maybe you'd like to change the lines:
>
> ```bash
> $ cd ~/j90x
> $ sudo bin/install-usr.sh # copy files to /usr
> ```
>
> to:
>
> ```bash
> $ cd ~/path/to/your/j90x/bin
> $ sudo install-usr.sh # copy files to /usr
> ```
>
> Or as an one liner:
>
> ```bash
> cd ~/path/to/your/j90x/bin && sudo install-usr.sh
> ```
>
> Best regards,
>
> Mike
>
> --
> Michail L. Liarmakopoulos, MSc
> Linkedin <https://www.linkedin.com/in/mlliarm/>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to