Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CLI_Command.php : Update uninstall script #1847

Closed
wants to merge 1 commit into from
Closed

CLI_Command.php : Update uninstall script #1847

wants to merge 1 commit into from

Conversation

iamimmanuelraj
Copy link

╭─root@immanuelraj.dev ~  
╰─➤  cd /
╭─root@immanuelraj.dev /  
╰─➤  ls
bin  boot  dev  etc  helper-functions  home  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  srv  swapfile  sys  tmp  usr  var
╭─root@immanuelraj.dev /  
╰─➤  cat helper-functions 
#!/usr/bin/env bash

# These functions have been adapted from
# https://github.com/dokku/dokku/blob/master/plugins/common/functions

has_tty() {
  declare desc="return 0 if we have a tty"
  if [[ "$(/usr/bin/tty || true)" == "not a tty" ]]; then
    return 1
  else
    return 0
  fi
}

ee_log_quiet() {
  declare desc="log quiet formatter"
  if [[ -z "$EE_QUIET_OUTPUT" ]]; then
    echo "$*"
  fi
}

ee_log_info1() {
  declare desc="log info1 formatter"
  echo "-----> $*"
}

ee_log_info2() {
  declare desc="log info2 formatter"
  echo "=====> $*"
}

ee_log_info1_quiet() {
  declare desc="log info1 formatter (with quiet option)"
  if [[ -z "$EE_QUIET_OUTPUT" ]]; then
    echo "-----> $*"
  else
    return 0
  fi
}

ee_log_info2_quiet() {

```
╭─root@immanuelraj.dev ~  
╰─➤  cd /
╭─root@immanuelraj.dev /  
╰─➤  ls
bin  boot  dev  etc  helper-functions  home  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  srv  swapfile  sys  tmp  usr  var
╭─root@immanuelraj.dev /  
╰─➤  cat helper-functions 
#!/usr/bin/env bash

# These functions have been adapted from
# https://github.com/dokku/dokku/blob/master/plugins/common/functions

has_tty() {
  declare desc="return 0 if we have a tty"
  if [[ "$(/usr/bin/tty || true)" == "not a tty" ]]; then
    return 1
  else
    return 0
  fi
}

ee_log_quiet() {
  declare desc="log quiet formatter"
  if [[ -z "$EE_QUIET_OUTPUT" ]]; then
    echo "$*"
  fi
}

ee_log_info1() {
  declare desc="log info1 formatter"
  echo "-----> $*"
}

ee_log_info2() {
  declare desc="log info2 formatter"
  echo "=====> $*"
}

ee_log_info1_quiet() {
  declare desc="log info1 formatter (with quiet option)"
  if [[ -z "$EE_QUIET_OUTPUT" ]]; then
    echo "-----> $*"
  else
    return 0
  fi
}

ee_log_info2_quiet() {
```
@mrrobot47
Copy link
Member

This should be a part of https://github.com/easyengine/installer

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants