feat core
: Make removing wrappers possible.
This commit is contained in:
parent
11a0ba44f3
commit
0489d4ba43
1 changed files with 4 additions and 40 deletions
44
blueprint.sh
44
blueprint.sh
|
@ -1183,20 +1183,6 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) || ( $2 == "-add" ) ]]; then VCMD="
|
||||||
|
|
||||||
# Place dashboard wrapper
|
# Place dashboard wrapper
|
||||||
if [[ $dashboard_wrapper != "" ]]; then
|
if [[ $dashboard_wrapper != "" ]]; then
|
||||||
#PRINT INFO "Cloning and injecting dashboard wrapper.."
|
|
||||||
#if [[ $DUPLICATE == "y" ]]; then
|
|
||||||
# sed -n -i "/<!--@$identifier:s@-->/{p; :a; N; /<!--@$identifier:e@-->/!ba; s/.*\n//}; p" "resources/views/blueprint/dashboard/dashboard.blade.php"
|
|
||||||
# sed -i \
|
|
||||||
# -e "s~<!--@$identifier:s@-->~~g" \
|
|
||||||
# -e "s~<!--@$identifier:e@-->~~g" \
|
|
||||||
# "resources/views/blueprint/dashboard/dashboard.blade.php"
|
|
||||||
#fi
|
|
||||||
#touch ".blueprint/tmp/$n/$dashboard_wrapper.BLUEPRINTBAK"
|
|
||||||
#cat <(echo -e "<!--@$identifier:s@-->\n@if(\$blueprint->dbGet('blueprint', 'extensionconfig_${identifier}_dashboardwrapper') != '0')\n") ".blueprint/tmp/$n/$dashboard_wrapper" > ".blueprint/tmp/$n/$dashboard_wrapper.BLUEPRINTBAK"
|
|
||||||
#cp ".blueprint/tmp/$n/$dashboard_wrapper.BLUEPRINTBAK" ".blueprint/tmp/$n/$dashboard_wrapper"
|
|
||||||
#rm ".blueprint/tmp/$n/$dashboard_wrapper.BLUEPRINTBAK"
|
|
||||||
#echo -e "\n@endif\n<!--@$identifier:e@-->" >> ".blueprint/tmp/$n/$dashboard_wrapper"
|
|
||||||
#sed -i "/<\!-- wrapper:insert -->/r .blueprint/tmp/$n/$dashboard_wrapper" "resources/views/blueprint/dashboard/dashboard.blade.php"
|
|
||||||
PRINT INFO "Cloning and linking dashboard wrapper.."
|
PRINT INFO "Cloning and linking dashboard wrapper.."
|
||||||
if [[ -f "resources/views/blueprint/dashboard/wrappers/$identifier.blade.php" ]]; then rm "resources/views/blueprint/dashboard/wrappers/$identifier.blade.php"; fi
|
if [[ -f "resources/views/blueprint/dashboard/wrappers/$identifier.blade.php" ]]; then rm "resources/views/blueprint/dashboard/wrappers/$identifier.blade.php"; fi
|
||||||
if [[ ! -d ".blueprint/extensions/$identifier/wrappers" ]]; then mkdir ".blueprint/extensions/$identifier/wrappers"; fi
|
if [[ ! -d ".blueprint/extensions/$identifier/wrappers" ]]; then mkdir ".blueprint/extensions/$identifier/wrappers"; fi
|
||||||
|
@ -1206,20 +1192,6 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) || ( $2 == "-add" ) ]]; then VCMD="
|
||||||
|
|
||||||
# Place admin wrapper
|
# Place admin wrapper
|
||||||
if [[ $admin_wrapper != "" ]]; then
|
if [[ $admin_wrapper != "" ]]; then
|
||||||
#PRINT INFO "Cloning and injecting admin wrapper.."
|
|
||||||
#if [[ $DUPLICATE == "y" ]]; then
|
|
||||||
# sed -n -i "/<!--@$identifier:s@-->/{p; :a; N; /<!--@$identifier:e@-->/!ba; s/.*\n//}; p" "resources/views/blueprint/admin/admin.blade.php"
|
|
||||||
# sed -i \
|
|
||||||
# -e "s~<!--@$identifier:s@-->~~g" \
|
|
||||||
# -e "s~<!--@$identifier:e@-->~~g" \
|
|
||||||
# "resources/views/blueprint/admin/admin.blade.php"
|
|
||||||
#fi
|
|
||||||
#touch ".blueprint/tmp/$n/$admin_wrapper.BLUEPRINTBAK"
|
|
||||||
#cat <(echo -e "<!--@$identifier:s@-->\n@if(\$blueprint->dbGet('blueprint', 'extensionconfig_${identifier}_adminlayouts') != '0')\n") ".blueprint/tmp/$n/$admin_wrapper" > ".blueprint/tmp/$n/$admin_wrapper.BLUEPRINTBAK"
|
|
||||||
#cp ".blueprint/tmp/$n/$admin_wrapper.BLUEPRINTBAK" ".blueprint/tmp/$n/$admin_wrapper"
|
|
||||||
#rm ".blueprint/tmp/$n/$admin_wrapper.BLUEPRINTBAK"
|
|
||||||
#echo -e "\n@endif\n<!--@$identifier:e@-->" >> ".blueprint/tmp/$n/$admin_wrapper"
|
|
||||||
#sed -i "/<\!-- wrapper:insert -->/r .blueprint/tmp/$n/$admin_wrapper" "resources/views/blueprint/admin/admin.blade.php"
|
|
||||||
PRINT INFO "Cloning and linking admin wrapper.."
|
PRINT INFO "Cloning and linking admin wrapper.."
|
||||||
if [[ -f "resources/views/blueprint/admin/wrappers/$identifier.blade.php" ]]; then rm "resources/views/blueprint/admin/wrappers/$identifier.blade.php"; fi
|
if [[ -f "resources/views/blueprint/admin/wrappers/$identifier.blade.php" ]]; then rm "resources/views/blueprint/admin/wrappers/$identifier.blade.php"; fi
|
||||||
if [[ ! -d ".blueprint/extensions/$identifier/wrappers" ]]; then mkdir ".blueprint/extensions/$identifier/wrappers"; fi
|
if [[ ! -d ".blueprint/extensions/$identifier/wrappers" ]]; then mkdir ".blueprint/extensions/$identifier/wrappers"; fi
|
||||||
|
@ -1446,22 +1418,14 @@ if [[ ( $2 == "-r" ) || ( $2 == "-remove" ) ]]; then VCMD="y"
|
||||||
|
|
||||||
# Remove admin wrapper
|
# Remove admin wrapper
|
||||||
if [[ $admin_wrapper != "" ]]; then
|
if [[ $admin_wrapper != "" ]]; then
|
||||||
PRINT INFO "Removing admin wrapper.."
|
PRINT INFO "Removing and unlinking admin wrapper.."
|
||||||
sed -n -i "/<!--@$identifier:s@-->/{p; :a; N; /<!--@$identifier:e@-->/!ba; s/.*\n//}; p" "resources/views/blueprint/admin/admin.blade.php"
|
rm "resources/views/blueprint/admin/wrappers/$identifier.blade.php";
|
||||||
sed -i \
|
|
||||||
-e "s~<!--@$identifier:s@-->~~g" \
|
|
||||||
-e "s~<!--@$identifier:e@-->~~g" \
|
|
||||||
"resources/views/blueprint/admin/admin.blade.php"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove dashboard wrapper
|
# Remove dashboard wrapper
|
||||||
if [[ $dashboard_wrapper != "" ]]; then
|
if [[ $dashboard_wrapper != "" ]]; then
|
||||||
PRINT INFO "Removing dashboard wrapper.."
|
PRINT INFO "Removing and unlinking dashboard wrapper.."
|
||||||
sed -n -i "/<!--@$identifier:s@-->/{p; :a; N; /<!--@$identifier:e@-->/!ba; s/.*\n//}; p" "resources/views/blueprint/dashboard/dashboard.blade.php"
|
rm "resources/views/blueprint/dashboard/wrappers/$identifier.blade.php";
|
||||||
sed -i \
|
|
||||||
-e "s~<!--@$identifier:s@-->~~g" \
|
|
||||||
-e "s~<!--@$identifier:e@-->~~g" \
|
|
||||||
"resources/views/blueprint/dashboard/dashboard.blade.php"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove dashboard css
|
# Remove dashboard css
|
||||||
|
|
Loading…
Reference in a new issue