Skip to content

Commit

Permalink
more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
codepuncher committed Mar 14, 2024
1 parent 6fac713 commit 1315e08
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
13 changes: 10 additions & 3 deletions shell/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,16 @@ valet() {
/usr/local/bin/valet "${ARGS[@]}"
}
wp_valet_link_all_network_sites() {
for domain in $(wp site list --field=url | sed 's/.*:\/\///g' | sed 's/\.test*\///g'); do
echo "${domain}"
valet link --secure "${domain}"
WSL_WINDOWS_HOSTS_FILE='/mnt/c/Windows/System32/drivers/etc/hosts'
for DOMAIN in $(wp site list --field=url); do
DOMAIN="${DOMAIN%.*}";
DOMAIN="${DOMAIN##*/}";
echo "${DOMAIN}"
valet link --secure "${DOMAIN}"
if [ -f "${WSL_WINDOWS_HOSTS_FILE}" ]; then
LINE="127.0.0.1 ${DOMAIN}.test"
sudo bash -c "echo ${LINE} >> ${WSL_WINDOWS_HOSTS_FILE}" && echo "${DOMAIN} added to Windows Hosts file"
fi
done
}

Expand Down
9 changes: 7 additions & 2 deletions shell/functions
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,13 @@ install_arch_packages() {

install_wsl_packages() {
PACKAGES=(
# General
# Text processing
pandoc
texlive-latex-base
texlive-latex-extra
texlive-latex-recommended
texlive-fonts-recommended
texlive-fonts-extra

# Dev
tmux
Expand Down Expand Up @@ -182,7 +187,7 @@ install_rustup() {
install_mailpit() {
if ! sudo bash < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh); then
echo 'Failed to install Mailpit' >&2
return 1
return 1
fi
sudo ln -s "${HOME}/.dotfiles/templates/mailpit.service" "/etc/systemd/system/mailpit.service"
sudo systemctl enable mailpit && sudo systemctl start mailpit
Expand Down

0 comments on commit 1315e08

Please sign in to comment.