Something like beta version - use with respect :)
Cotls is a set of tools for (web) developers to they can easily manage their daily routines (backuping, deployment, dumping, batch commands, ...).
You can also make groups of commands (batch) and they can be run by one command.
Minimum requirement is BASH 4.x
Run in your command line
cURL
curl https://raw.githubusercontent.com/hansek/cotls/master/cotls-installer.sh | bash
Wget
wget -qO- https://raw.githubusercontent.com/hansek/cotls/master/cotls-installer.sh | bash
chmod +x ~/cotls.sh
alias cotls="~/cotls.sh"
cotls syncdown
*.sql
, *.zip
, *.gz
formats)Will be simplified later
cp ./cotls_completion.sh /etc/bash_completion.d/cotls
-v
-c=<config-suffix>
You can have more than one config files in your project directory e.g. .cotls (default without suffix), .cotls.dev (dev suffix), .cotls.stage (stage suffix), ...
-cp=<path-to-config-file>
Path can be relative or absolute, default value is current directory.
Allow to call Cotls outside of folder with config file
-prdb
Prompt user for remote database password to it havn't to be stored inside config file
SSH_USER="user"
SSH_SERVER="server.example.com"
# For connection to remote database you can use:
# A) auto loading of DB credentials from PHP files
PROJECT_CMS="drupal7" # drupal7 | wordpress | modx | nette | prestashop | radek
PROJECT_SETTINGS_FILE="httpdocs/sites/default/settings.php"
# B) defining database credentials here
DB_REMOTE_NAME="my_project"
DB_REMOTE_USER="project_user"
DB_REMOTE_PASS="password"
DB_REMOTE_IGNORED_TABLES=(
"log"
)
DB_REMOTE_PARAMETERS=(
# "--no-data"
)
CUSTOM_TARGET_FILENAME="dump"
DB_LOCAL_NAME="my_project_local"
DB_LOCAL_USER="root"
DB_LOCAL_PASS="root"
DB_LOCAL_NAME="my_project_local"
DB_LOCAL_USER="root"
DB_LOCAL_PASS="root"
FILE_TO_IMPORT="dump"
SSH_USER="user"
SSH_SERVER="server.example.com"
PROJECT_LOCAL_ROOT="www/"
RSYNC_PARAMETERS=(
)
RSYNC_REMOTE_ROOT_PATH="httpdocs/"
RSYNC_REMOTE_PATHS=(
"www"
)
RSYNC_EXCLUDE__WWW=(
"cache/*"
)
RSYNC_FORCE_LOCAL__WWW=(
"sites/default/settings.php"
)
PROJECT_LOCAL_ROOT="www/"
CHMOD_PATHS_WRITE=(
"sites/default/files/"
"tmp/"
)
SSH_USER="user"
SSH_SERVER="server.example.com"
PROJECT_REMOTE_GIT_ROOT="httpdocs/"
PROJECT_REMOTE_GIT_BRANCH="origin master"
# you have to have config variables for each command set ;)
BATCH__FULL=(
"dumpdown -tf=dump"
"fulldrop"
"import -tf=dump"
"syncdown"
)
... TBD ...
Example commands to run in command line:
... TBD ...
--password
argument to load all password on script start by user promptAll contents of this package are licensed under the MIT license.