Plugin Execution on MacOS
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- PHP
- Star
- 15
- Fork
- 21
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pluginsGLPI/empty
-
provide a windows batch file Đang mởenhancement
pluginsGLPI/empty#22 · 3 bình luận · 1 người được giao ·
Tất cả issue của pluginsGLPI/empty
Issue tương tự
-
Error on exporting the error log Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
pluginsGLPI/datainjection#673 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
octobercms/october#6130 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
getgrav/grav-plugin-form#656 ·
-
customer-support needs-triage Platform(Default)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100