diff --git a/build_dev.sh b/build_dev.sh new file mode 100644 index 0000000..c9517b7 --- /dev/null +++ b/build_dev.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Include vars +. var.sh + +# Creating release path +rm -r -f ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public +mkdir -p ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public + +# Copying source files +cp -R ${ROOT_PATH}/Admin/ ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public +cp -R ${ROOT_PATH}/External/ ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public +cp -R ${ROOT_PATH}/phpOMS/ ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public +cp -R ${ROOT_PATH}/Modules/ ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public +cp -R ${ROOT_PATH}/Model/ ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public +cp -R ${ROOT_PATH}/cssOMS/ ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public +cp -R ${ROOT_PATH}/Web/ ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public +cp -R ${ROOT_PATH}/Socket/ ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public +cp -R ${ROOT_PATH}/Console/ ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public +cp -R ${ROOT_PATH}/jsOMS/ ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Public + +# Removing none dev files +find ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Dev -name "*.css" -type f -delete +find ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Dev -name "*.min.js" -type f -delete +find ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Dev -name "private.php" -type f -delete +find ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Dev -name "private.sh" -type f -delete diff --git a/build_frontend.sh b/build_frontend.sh new file mode 100644 index 0000000..a9bf588 --- /dev/null +++ b/build_frontend.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/build_public.sh b/build_public.sh index 9ced87d..1c055f3 100644 --- a/build_public.sh +++ b/build_public.sh @@ -1,60 +1,60 @@ #!/bin/bash -# Include private +# Include vars . var.sh # Removing unnecessary attribute quotes (only for end user release not for dev release) -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(name=")([a-zA-Z0-9\-\_]*)(")/name=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(for=")([a-zA-Z0-9\-\_]*)(")/for=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(id=")([a-zA-Z0-9\-\_]*)(")/id=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(class=")([a-zA-Z0-9\-\_]*)(")/class=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(min=")([a-zA-Z0-9\-\_]*)(")/min=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(min=")([a-zA-Z0-9\-\_]*)(")/min=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(max=")([a-zA-Z0-9\-\_]*)(")/max=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(type=")([a-zA-Z0-9\-\_]*)(")/type=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(role=")([a-zA-Z0-9\-\_]*)(")/role=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(method=")(.*)(")/method=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(action=")(.*)(")/action=\2/g' -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(href=")(.*)(")/href=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(name=")([a-zA-Z0-9\-\_]*)(")/name=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(for=")([a-zA-Z0-9\-\_]*)(")/for=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(id=")([a-zA-Z0-9\-\_]*)(")/id=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(class=")([a-zA-Z0-9\-\_]*)(")/class=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(min=")([a-zA-Z0-9\-\_]*)(")/min=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(min=")([a-zA-Z0-9\-\_]*)(")/min=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(max=")([a-zA-Z0-9\-\_]*)(")/max=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(type=")([a-zA-Z0-9\-\_]*)(")/type=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(role=")([a-zA-Z0-9\-\_]*)(")/role=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(method=")(.*)(")/method=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(action=")(.*)(")/action=\2/g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/(href=")(.*)(")/href=\2/g' # Removing unnecessary whitespace -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/ */ /g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e 's/ */ /g' # Removing unnecessary newline -find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e ':a;N;$!ba;s/\n/ /g' +find ${ROOT_PATH} -name "*tpl.php" | xargs -L1 sed -i -e ':a;N;$!ba;s/\n/ /g' # Removing comments -find $ROOT_PATH -name "*tpl.php" | sed -e :a -re 's///g;///g;/