Queer European MD passionate about IT
Explorar o código

Script moved to dynamic folder and refactored accordingly

Davte %!s(int64=5) %!d(string=hai) anos
pai
achega
6a27dec584
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      dynamic/update_image_editor.sh

+ 5 - 3
update_image_editor.sh → dynamic/update_image_editor.sh

@@ -1,6 +1,8 @@
 # Get current directory
 this_script_directory=$(cd `dirname $0` && pwd);
-log_file="$this_script_directory/dynamic/data/log.txt";
+project_directory=$(dirname "$this_script_directory")
+
+log_file="$this_script_directory/data/log.txt";
 separator="*****"
 
 echo "$separator $(date '+%Y-%d-%m %H:%M:%S') - update image-editor begins ... $separator" >> "$log_file";
@@ -8,9 +10,9 @@ echo "$separator $(date '+%Y-%d-%m %H:%M:%S') - update image-editor begins ... $
 git submodule update --remote --merge &>> "$log_file";
 
 # Delete the outdated folder
-rm -r "$this_script_directory/static/image-editor" &>> "$log_file";
+rm -r "$project_directory/static/image-editor" &>> "$log_file";
 
 # Copy the updated folder
-cp -r "$this_script_directory/image-editor/src" "$this_script_directory/static/image-editor" &>> "$log_file";
+cp -r "$project_directory/image-editor/src" "$project_directory/static/image-editor" &>> "$log_file";
 
 echo "$separator ... update image-editor ends $separator" >> "$log_file";