Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blocks:manage_script_directory [2024-03-20 14:09]
mattias [Manage the script directory]
blocks:manage_script_directory [2024-09-23 12:59] (current)
mattias [Manual update]
Line 1: Line 1:
 =====Manage the script directory===== =====Manage the script directory=====
  
-We keep the latest version on our script environment in our [[https://github.com/pixilab/blocks-script|blocks-script repo on github]].+We always keep the latest version on our script environment in our [[https://github.com/pixilab/blocks-script|blocks-script repo on github]]. 
 + 
 +:!: Before doing anything with an existing script directory in a working system, it is always recommended to make a security copy of the /PIXILAB-Blocks-root/script/ directory in case something goes wrong. 
  
-:!: Before doing anything with an existing script directory in a working system, it is always recommended to: 
-  * stop the server 
-  * make a security copy of the /PIXILAB-Blocks-root/script/ directory in case something goes wrong. 
  
 ====First time installation==== ====First time installation====
Line 12: Line 12:
  
 ===Get the files=== ===Get the files===
-There are a few different methods to obtain the files, but in general for any desktop environments one can download a zip of the repo by clicking the green <CODE> dropdown and select the option to [[https://github.com/pixilab/blocks-script/archive/refs/heads/master.zip|Download ZIP]]. This zip will contain all the files. +There are a few different methods to obtain the files, but in general for any desktop environments one can download a compressed .zip archive of the repo ([[https://github.com/pixilab/blocks-script|]]) by clicking the green <CODE> dropdown and select the option to [[https://github.com/pixilab/blocks-script/archive/refs/heads/master.zip|Download ZIP]]. This zip will contain all the latest files. 
  
 ===Decompress the files=== ===Decompress the files===
-When this file is decompressed it will result in a new directory, blocks-script-master. Navigate inside this directory and select all files and directories. Now one can drag/copy all the files into the /PIXILAB-Blocks-root/script/ directory. This will merge any new files and overwrite any older existing files, wish is typically what you want. +When this file is decompressed it will result in a new directory, blocks-script-master.  
 + 
 +===Merge the files into the script directory=== 
 +Navigate inside this directory and select all files and directories. Now one can drag/copy all the files into the /PIXILAB-Blocks-root/script/ directory. This will merge any new files and overwrite any older existing files, wish is typically what you want. 
    
  
  
  
-====Update==== +====Update the script directory==== 
-===Linux Desktop===+An update of the files is the same thing as with the fresh install for any desktop environment. For linux there is a script that automates this:  
 +===Production Linux Desktop environments=== 
 +For production Linux environments provisioned with our image, one can use the update_scripts.sh that automates the whole procedure including making a security copy and stopping the server. Before running the script, cd into the /script/ directory in the cli. The script has some dependencies that may be missing in i.e virtual machines not provisioned by the image.  
 +<code> 
 +pixi-server@pixi:~$ cd PIXILAB-Blocks-root/script/ 
 +</code> 
 +Run the script: 
 +<code> 
 +pixi-server@pixi:~/PIXILAB-Blocks-root/script$ ./update_scripts.sh 
 +</code> 
 +The script makes a backup copy of the directory, downloads the latest files and merges them into the existing scripts directory.  
 + 
 +If the update_scripts.sh is not present it can be done manually using the cli method below. 
 + 
 + 
 +====Manual update==== 
 +Follow the steps for the appropriate OS to manually update the files.  
 + 
 ===Linux CLI=== ===Linux CLI===
-===Windows desktop=== 
-===Window CLI=== 
  
-===MacOS desktop=== +<code> 
-===MacOS CLI===+#Navigate in to the script directory. 
 +$ cd PIXILAB-Blocks-root/script 
 + 
 +#Clone the current git repo from github. 
 +$ git clone -q https://github.com/pixilab/blocks-script.git 
 + 
 +#Merge the new and updated files into the existing directory. 
 +$ cp -r blocks-script/*  
 + 
 +#Remove the now obsolete cloned files. 
 +$ rm -r -f blocks-script 
 +</code> 
 +
 + 
 +===Desktop environments=== 
 + 
 +Make a copy of the existing PIXILAB-Blocks-root/script/ 
 +Download the files from [[ https://github.com/pixilab/blocks-script|github.]] This is done by clicking the green Code button and select Download ZIP archive from the drop-down menu. 
 +{{ :blocks:manage_script_directory:screenshot_2024-09-23_144107.png?600 |}} 
 + 
 +This will put a zip file in your default downloads directory.  
 +Doubleclick the zip and uncompress it to a temporary destination of your choice.  
 +Navigate to the blocks-script-master sourcedirectory in your temp destination and select and copy all files.  
 + 
 +{{ :blocks:manage_script_directory:screenshot_2024-09-23_145305.png?400 |}} 
 + 
 +Paste the source files into the existing PIXILAB-Blocks-root/script/ directory and select overwrite on all conflicts. 
 + 
 +Restart the server.