From 6ad0c61377772c1bceb53368c54714619aef7a27 Mon Sep 17 00:00:00 2001 From: Roni Laukkarinen Date: Tue, 13 Sep 2022 09:42:12 +0300 Subject: [PATCH] Ensure file permissions, add permissions task, release 1.2.3 --- CHANGELOG.md | 1 + bin/newblock.sh | 2 +- bin/tasks/acf.sh | 2 +- bin/tasks/get-block.sh | 3 +++ bin/tasks/permissions.sh | 8 ++++++++ 5 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 bin/tasks/permissions.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index e05ea7b..65bfcf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Modularize check-updates as task * Simplify get-block task by modularizing create-predefined-block as task +* Ensure file permissions, add permissions task ### 1.2.2: 2022-09-12 diff --git a/bin/newblock.sh b/bin/newblock.sh index 4d41a0f..34ab030 100755 --- a/bin/newblock.sh +++ b/bin/newblock.sh @@ -7,7 +7,7 @@ # Script specific vars SCRIPT_LABEL='for macOS' -SCRIPT_VERSION='1.2.2 (2022-09-12)' +SCRIPT_VERSION='1.2.3 (2022-09-13)' # Vars needed for this file to function globally CURRENTFILE=`basename $0` diff --git a/bin/tasks/acf.sh b/bin/tasks/acf.sh index 370e854..65c902e 100644 --- a/bin/tasks/acf.sh +++ b/bin/tasks/acf.sh @@ -8,4 +8,4 @@ mkdir -p ${PROJECT_THEME_PATH}/acf-json # Ensure file permissions for that folder -sudo chmod -R 777 ${PROJECT_THEME_PATH}/acf-json +source ${SCRIPTS_LOCATION}/tasks/permissions.sh diff --git a/bin/tasks/get-block.sh b/bin/tasks/get-block.sh index 541ed19..d030cbc 100644 --- a/bin/tasks/get-block.sh +++ b/bin/tasks/get-block.sh @@ -33,3 +33,6 @@ if [[ $IS_RENAMED_BLOCK =~ "yes" ]]; then # Run rename task source ${SCRIPTS_LOCATION}/tasks/rename.sh fi + +# Ensure file permissions for ACF folder +source ${SCRIPTS_LOCATION}/tasks/permissions.sh diff --git a/bin/tasks/permissions.sh b/bin/tasks/permissions.sh new file mode 100644 index 0000000..0706f6c --- /dev/null +++ b/bin/tasks/permissions.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# @Author: Roni Laukkarinen +# @Date: 2021-11-23 18:26:55 +# @Last Modified by: Roni Laukkarinen +# @Last Modified time: 2022-01-11 17:16:01 + +# Ensure file permissions for that folder +sudo chmod -R 777 ${PROJECT_THEME_PATH}/acf-json