Queer European MD passionate about IT
瀏覽代碼

Log performed operations

Davte 5 年之前
父節點
當前提交
e0d1f7cc55
共有 1 個文件被更改,包括 8 次插入3 次删除
  1. 8 3
      update_image_editor.sh

+ 8 - 3
update_image_editor.sh

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