1#!/usr/local/bin/bash 2# 3# Create the .tgz file ../plugin-dir.tgz 4# 5dokuwiki_root=/usr/local/www/dokuwiki 6dokuwiki_plugin_root="${dokuwiki_root}/lib/plugins" 7plugin_tgz_file="${dokuwiki_plugin_root}/plugin-dir.tgz" 8 9if [ -f "${plugin_tgz_file}" ] ; then 10 rm -f "{plugin_tgz_file}" 11fi 12cd "${dokuwiki_plugin_root}" || exit 1 13 14# 15# Remove the backup files 16# 17rm -f dir/.* > /dev/null 2>&1 18# 19# Create the tar file 20# 21echo "Creating ${plugin_tgz_file}" 22tar --create -z --verbose --exclude 'manager.dat' --file "${plugin_tgz_file}" "./dir" 23echo rc=$? 24# 25# List the contents 26# 27echo "Contents of ${plugin_tgz_file}:" 28tar --list --file "${plugin_tgz_file}" 29 30