Skip to content

Instantly share code, notes, and snippets.

@opportus
opportus / backup
Created November 4, 2019 01:36
Backup script
#!/bin/bash
backup_date=$(date --iso-8601=second)
if [[ "0" == "$UID" ]]; then
backup_dir="/var/local/backup"
backup_config_dir="/usr/local/etc/backup"
else
backup_dir="${HOME}/.cache/backup"
backup_config_dir="${HOME}/.config/backup"
@opportus
opportus / installer.sh
Created October 19, 2017 16:59
Simple installer bash script for https://github.com/opportus/blog
#!/bin/bash
# Exits the script if an error occurs...
set -e
# Project installation...
echo ""
echo "Running the application installation..."
echo ""
echo "Enter the ABSOLUTE PATH of your application directory (its directory will be created if it doesn't exist...):"