mirror of
https://github.com/m8tin/cis.git
synced 2025-12-06 07:48:26 +01:00
fixed addAndCheckGitRepository.sh, var RIGHTS was not created locally
This commit is contained in:
@@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
|
|
||||||
function checkPermissions(){
|
function checkPermissions(){
|
||||||
local _FOLDER _REPOSITORY
|
local _FOLDER _RIGHTS
|
||||||
_FOLDER="${1:?"Missing first parameter FOLDER"}"
|
_FOLDER="${1:?"Missing first parameter FOLDER"}"
|
||||||
_RIGHTS="${2:?"Missing second parameter RIGHTS"}"
|
_RIGHTS="${2:?"Missing second parameter RIGHTS"}"
|
||||||
readonly _FOLDER _REPOSITORY
|
readonly _FOLDER _RIGHTS
|
||||||
|
|
||||||
[ "${_RIGHTS}" == "readonly" ] \
|
[ "${_RIGHTS}" == "readonly" ] \
|
||||||
&& [ -d "${_FOLDER}/.git" ] \
|
&& [ -d "${_FOLDER}/.git" ] \
|
||||||
@@ -77,7 +77,7 @@ function printRepository(){
|
|||||||
function addAndCheckGitRepository() {
|
function addAndCheckGitRepository() {
|
||||||
local _FOLDER _REPOSITORY _RIGHTS
|
local _FOLDER _REPOSITORY _RIGHTS
|
||||||
_FOLDER="${1:?"Missing first parameter FOLDER"}"
|
_FOLDER="${1:?"Missing first parameter FOLDER"}"
|
||||||
_RIGHTS="${2:?"Missing third parameter RIGHTS: (readonly, writable) "}"
|
_RIGHTS="${2:?"Missing second parameter RIGHTS: (readonly, writable) "}"
|
||||||
_REPOSITORY="$(printRepository "${_FOLDER}" "${3}")"
|
_REPOSITORY="$(printRepository "${_FOLDER}" "${3}")"
|
||||||
readonly _FOLDER _REPOSITORY _RIGHTS
|
readonly _FOLDER _REPOSITORY _RIGHTS
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user