forked from ambientum/ambientum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.fish
41 lines (32 loc) · 1.14 KB
/
commands.fish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# where the ambientum cache will live
set A_BASE $HOME/.cache/ambientum
# define specific cache directories
set A_CONFIG $A_BASE/.config
set A_CACHE $A_BASE/.cache
set A_LOCAL $A_BASE/.local
set A_SSH $HOME/.ssh
set A_COMPOSER $A_BASE/.composer
# create directories
mkdir -p $A_CONFIG
mkdir -p $A_CACHE
mkdir -p $A_LOCAL
mkdir -p $A_COMPOSER
###########################################
#### DO NOT EDIT BELOW THIS LINE UNLESS #
#### YOU KNOW WHAT YOU'RE DOING #
###########################################
# reset permissions
chown -R (whoami):(whoami) $A_BASE
# home directory
set A_USER_HOME /home/ambientum
####
# alias for NPM And other node commands
####
# node Env
function n
docker run -it --rm -v (pwd):/var/www/app -v $A_CONFIG:$A_USER_HOME/.config -v $A_CACHE:$A_USER_HOME/.cache -v $A_LOCAL:$A_USER_HOME/.local -v $A_SSH:$A_USER_HOME/.ssh ambientum/node:7 $argv
end
# php Env
function p
docker run -it --rm -v (pwd):/var/www/app -v $A_COMPOSER:$A_USER_HOME/.composer -v $A_CONFIG:$A_USER_HOME/.config -v $A_CACHE:$A_USER_HOME/.cache -v $A_LOCAL:$A_USER_HOME/.local -v $A_SSH:$A_USER_HOME/.ssh ambientum/php:7.1 $argv
end