Skip to content

Commit a30de1a

Browse files
committed
drush-uli.sh
1 parent 5e0b780 commit a30de1a

File tree

4 files changed

+31
-1
lines changed

4 files changed

+31
-1
lines changed

.ddev/addon-metadata/pimp-my-shell/manifest.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: pimp-my-shell
22
repository: .
33
version: ""
4-
install_date: "2024-03-28T11:06:50-03:00"
4+
install_date: "2024-03-28T11:32:16-03:00"
55
project_files:
66
- web-build/Dockerfile.pimp-my-shell
77
- homeadditions/.bashrc.d/pimp-my-shell.sh
@@ -13,5 +13,6 @@ project_files:
1313
- pimp-my-shell/hooks/README.md
1414
- pimp-my-shell/hooks/post-import-db.sh
1515
- pimp-my-shell/hooks/post-import-db.d
16+
- pimp-my-shell/scripts/drush-uli.sh
1617
global_files: []
1718
removal_actions: []
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
#ddev-generated
3+
set -e -o pipefail
4+
5+
boxes_args=${DDEV_PIMP_MY_SHELL_DRUSH_ULI_BOXES_FORMAT-"-d peek -p h3v1"}
6+
if [[ "$DDEV_PROJECT_TYPE" == *"drupal"* ]] || [[ "$DDEV_PIMP_MY_SHELL_PROJECT_TYPE" == *"drupal"* ]]; then
7+
uli=$(drush uli "$@")
8+
echo -e "\033[1;32m"
9+
echo $uli | boxes $boxes_args
10+
echo -en "\033[0m"
11+
else
12+
gum log --level debug "Not drupal"
13+
exit 1
14+
fi

install.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ project_files:
1010
- pimp-my-shell/hooks/README.md
1111
- pimp-my-shell/hooks/post-import-db.sh
1212
- pimp-my-shell/hooks/post-import-db.d
13+
- pimp-my-shell/scripts/drush-uli.sh

pimp-my-shell/scripts/drush-uli.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
#ddev-generated
3+
set -e -o pipefail
4+
5+
boxes_args=${DDEV_PIMP_MY_SHELL_DRUSH_ULI_BOXES_FORMAT-"-d peek -p h3v1"}
6+
if [[ "$DDEV_PROJECT_TYPE" == *"drupal"* ]] || [[ "$DDEV_PIMP_MY_SHELL_PROJECT_TYPE" == *"drupal"* ]]; then
7+
uli=$(drush uli "$@")
8+
echo -e "\033[1;32m"
9+
echo $uli | boxes $boxes_args
10+
echo -en "\033[0m"
11+
else
12+
gum log --level debug "Not drupal"
13+
exit 1
14+
fi

0 commit comments

Comments
 (0)