Plugin Execution on MacOS
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by locating the plugin-generation script that processes setup.php, hook.php, $LNAME.xml, tools/HEADER, and README.md. Review the macOS and non-macOS branches, then run the plugin generation flow on macOS and another system to verify name substitutions and generated filenames behave as intended.
Written by the indexing model from the issue text.
Description
To run the plugin on MacOS we required some customizations please merge it if possible
LNAME and UNAME was returning blank causing the issue
# Check if running on macOS
if [[ "$(uname)" == "Darwin" ]]; then
# Use tr for macOS
NAME=$(echo "$1" | tr -dc 'a-zA-Z')
LNAME=$(echo "$NAME" | tr '[:upper:]' '[:lower:]') # Convert to lowercase
UNAME=$(echo "$NAME" | tr '[:lower:]' '[:upper:]') # Convert to uppercase
else
# Use Bash 4+ syntax for other systems
NAME=$(echo "$1" | tr -dc '[[:alpha:]]')
LNAME=${NAME,,} # Convert to lowercase
UNAME=${NAME^^} # Convert to uppercase
fi
Replacement was failing and getting new files with names as hook.phpsetup.php etc
# Check if running on macOS
if [[ "$(uname)" == "Darwin" ]]; then
# Use tr for macOS
sed \
-e "s/{NAME}/$NAME/g" \
-e "s/{LNAME}/$LNAME/g" \
-e "s/{UNAME}/$UNAME/g" \
-e "s/{VERSION}/$VERSION/g" \
-e "s/{YEAR}/$YEAR/g" \
-i '' setup.php hook.php $LNAME.xml tools/HEADER README.md
else
# Use Bash 4+ syntax for other systems
sed \
-e "s/{NAME}/$NAME/" \
-e "s/{LNAME}/$LNAME/" \
-e "s/{UNAME}/$UNAME/" \
-e "s/{VERSION}/$VERSION/" \
-e "s/{YEAR}/$YEAR/" \
-i setup.php hook.php $LNAME.xml tools/HEADER README.md
fi
- Dominant language
- PHP
- Stars
- 15
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pluginsGLPI/empty
-
enhancement
pluginsGLPI/empty#22 · 3 comments · 1 assignee ·
All issues in pluginsGLPI/empty
Similar issues
-
a11y admissions.uiowa.edu needs grooming SiteImprove best practice
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Save States Menu Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pluginsGLPI/datainjection#673 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
octobercms/october#6130 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
getgrav/grav-plugin-form#656 ·