Unsolved [V4.x Coding] Installer update and rebuild scripts assume MagicMirror location
-
The
installer/rebuild.sh
andinstaller/update.sh
scripts attempt to:cd ~/MagicMirror/modules/MMM-GoogleAssistant
The assumption that MagicMirror was installed in the user’s home directory is almost always correct but, in my case, not so. I have installed MagicMirror in
/usr/local/MagicMirror
. This same assumption is also made by the MMM-Detector scripts and maybe other modules as well.I am able to work around the issue by editing the installer scripts prior to running an update or rebuild. I do not know if you wish to support alternate MagicMirror installation locations in your installer scripts but if you do, here is what I do in my scripts:
MM=${HOME}/MagicMirror [ -d ${MM}/config ] || { MM= for homedir in /usr/local /home/* do [ "${homedir}" == "/home/*" ] && continue [ -d ${homedir}/MagicMirror/config ] && { MM="${homedir}/MagicMirror" break } done }
Alternately, the update and rebuild npm commands are being run in the module’s installation directory so is there really a need to change directory using an absolute pathname? Maybe it is preferable to simply
cd ..
or not at all? I leave it up to you, just letting you know that the scripts break on some MagicMirror installations. -
I actually made a pretty simple script is pretty basic but it works.
It just copies everything in the directories over to my server and in the event of something going wrong. I can restore them as well. It’s pretty simple -
I think, it’s better to do something else for v4
@doctorfree, you want to do something else… you can purpose in v4.x branch
Actually, i don’t really want to correct / add some feature in v3.3.x -
I will look at v4 and contribute what I can. I appreciate your efforts and good work.
With respect to the MagicMirror installation location, I am resolving this on my end by creating a symbolic link in the user’s home directory if no MagicMirror directory exists there. The symbolic link points to the detected MagicMirror location. This will make my code compatible with modules that assume /home/pi/MagicMirror/modules is where they are installed. I don’t think non-standard MagicMirror install location is very common but I prefer placing it in a location all users can access. Anyway, this change is not high priority and I agree it can wait till we have something agreeable in v4.
-
actually, not many new thing is coded in v4…
I decode all sub-module and recode it in a separate module
actually +/- done :- EXT-Volume
- EXT-YouTubeCast
- EXT-Links
ALL Features will be decoded to recode it in a separate module (with EXT-*)
I think, i will take one month to do it …Final result will be a Clean GA module with EXT-* module to install on demand
ALL RPI user can install module wanted -
bugsounet
-
bugsounet