Source Update
This commit is contained in:
		
							
								
								
									
										33
									
								
								src/base.sh
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								src/base.sh
									
									
									
									
									
								
							@@ -18,26 +18,25 @@ echo -n "
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start() {
 | 
			
		||||
syntax-line-douple
 | 
			
		||||
echo -n "Warén CLI "
 | 
			
		||||
syntax-line-douple
 | 
			
		||||
if [[ -d "./src" ]]
 | 
			
		||||
then
 | 
			
		||||
  podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php &> /dev/null
 | 
			
		||||
  mv wx.tmp wx &> /dev/null
 | 
			
		||||
  chmod +x wx &> /dev/null
 | 
			
		||||
else
 | 
			
		||||
  sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null
 | 
			
		||||
  if [[ -d "/usr/bin" ]]
 | 
			
		||||
  then
 | 
			
		||||
    sudo ln -sf /opt/wx /usr/bin/wx &> /dev/null
 | 
			
		||||
  fi
 | 
			
		||||
  sudo chmod +x /usr/bin/wx &> /dev/null
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
  syntax-line-douple
 | 
			
		||||
  echo -n "Warén CLI "
 | 
			
		||||
  syntax-line-douple
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
stop () {
 | 
			
		||||
  if [[ -d "./src" ]]
 | 
			
		||||
  then
 | 
			
		||||
    podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php &> /dev/null
 | 
			
		||||
    mv wx.tmp wx &> /dev/null
 | 
			
		||||
    chmod +x wx &> /dev/null
 | 
			
		||||
  else
 | 
			
		||||
    sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null
 | 
			
		||||
    if [[ -d "/usr/bin" ]]
 | 
			
		||||
    then
 | 
			
		||||
      sudo ln -sf /opt/wx /usr/bin/wx &> /dev/null
 | 
			
		||||
    fi
 | 
			
		||||
    sudo chmod +x /usr/bin/wx &> /dev/null
 | 
			
		||||
  fi
 | 
			
		||||
  echo " "
 | 
			
		||||
  echo " "
 | 
			
		||||
  exit 1
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user