mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
Added sleep
This commit is contained in:
parent
d1750014fd
commit
4ff78fb777
1 changed files with 13 additions and 9 deletions
|
|
@ -42,24 +42,28 @@ fi
|
||||||
# Alias List
|
# Alias List
|
||||||
alias ls='lsd'
|
alias ls='lsd'
|
||||||
|
|
||||||
# penpot alias function
|
# penpot {run|stop|update} alias function
|
||||||
penpot() {
|
penpot() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
run)
|
run)
|
||||||
sudo docker compose -p penpot -f ~/Documents/tools/penpot/docker-compose.yaml up -d
|
sudo docker compose -p penpot -f ~/Documents/tools/penpot/docker-compose.yaml up -d >/dev/null 2>&1
|
||||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
nohup bash -c '(sleep 10 && if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
xdg-open "http://localhost:9001"
|
xdg-open "http://localhost:9001"
|
||||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
open "http://localhost:9001"
|
open "http://localhost:9001"
|
||||||
fi
|
fi)' >/dev/null 2>&1 &
|
||||||
echo "Started penpot on http://localhost:9001"
|
echo "Started penpot on http://localhost:9001"
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
sudo docker compose -p penpot -f ~/Documents/tools/penpot/docker-compose.yaml down
|
|
||||||
echo "Stopping penpot"
|
echo "Stopping penpot"
|
||||||
|
sudo docker compose -p penpot -f ~/Documents/tools/penpot/docker-compose.yaml down >/dev/null 2>&1
|
||||||
|
;;
|
||||||
|
update)
|
||||||
|
sudo docker compose -f ~/Documents/tools/penpot/docker-compose.yaml pull
|
||||||
|
echo "Updated penpot!"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: penpot {run|stop}"
|
echo "Usage: penpot {run|stop|update}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue