Index: build/create_update_folder.sh =================================================================== diff -u -r0ae2999cc6bbbffb1a3c57c9c90097831a376594 -rb0bd6b5ed12f51214d3fc2996705594b514b828b --- build/create_update_folder.sh (.../create_update_folder.sh) (revision 0ae2999cc6bbbffb1a3c57c9c90097831a376594) +++ build/create_update_folder.sh (.../create_update_folder.sh) (revision b0bd6b5ed12f51214d3fc2996705594b514b828b) @@ -24,6 +24,8 @@ FOLDER_BIN=/home/dnavaei/workspace_UI/build/build/poky_64_release FOLDER_SRC=/home/dnavaei/workspace_UI/build/application FOLDER_DST=$1/"Update_folder" +TEMP_DIR="Temp" +CLOUD_SYNC="cloudsync" DENALI_BIN=denali FOLDER_SCR=scripts @@ -47,6 +49,8 @@ #create the destination folder mkdir -p "$FOLDER_DST" +mkdir -p "$TEMP_DIR" +mkdir -p "$FOLDER_DST"/"$CLOUD_SYNC" # Copy the required folders cp -r "$FOLDER_SRC"/"$FOLDER_SCR" "$FOLDER_DST" @@ -60,15 +64,19 @@ mv "$FOLDER_DST"/"$FOLDER_SCR"/"$SCRIPT_SU2" "$FOLDER_DST" mv "$FOLDER_DST"/"$FOLDER_SCR"/"$SCRIPT_RUN" "$FOLDER_DST" mv "$FOLDER_DST"/"$FOLDER_SCR"/"$SCRIPT_AUT" "$FOLDER_DST" +# Remove the ui.config folder after copying its contents +rm -rf "$FOLDER_DST"/ui.config #copy the UI Software device binary to the root folder of the usb cp "$FOLDER_BIN"/"$DENALI_BIN" "$FOLDER_DST" +cd "$TEMP_DIR" || return # Clone the cloud sync and checkout the wanted branch git clone ssh://git@dvm-linux02:7999/ui/cloudsync.git git --git-dir=cloudsync/.git checkout develop +cd .. # Move the cloud sync to the destination folder -mv cloudsync "$FOLDER_DST" +cp -r "$TEMP_DIR"/* "$FOLDER_DST"/"$CLOUD_SYNC" # Find all the files that are git related and are hidden and remove them IFS=$'\n' read -r -d '' -a listOfHiddenGits < <(find "$FOLDER_DST" -name ".git*")