2017-05-19 14:45:57 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#############################################################################
|
|
|
|
# Update webmin/usermin to the latest develop version from GitHub repo
|
|
|
|
# inspired by authentic-theme/theme-update.sh script, thanks qooob
|
|
|
|
#
|
2018-02-12 06:50:02 +01:00
|
|
|
# Version 1.5, 2018-02-12
|
2018-01-31 17:14:06 +01:00
|
|
|
#
|
2017-05-19 14:45:57 +02:00
|
|
|
# Kay Marquardt, kay@rrr.de, https://github.com/gandelwartz
|
|
|
|
#############################################################################
|
2018-02-12 13:25:24 +01:00
|
|
|
IAM=`basename $0`
|
2018-02-12 12:32:04 +01:00
|
|
|
|
2018-02-01 17:24:55 +01:00
|
|
|
# don't ask -y given
|
2018-02-11 21:27:53 +01:00
|
|
|
ASK="YES"
|
2018-02-02 00:10:31 +01:00
|
|
|
if [[ "$1" == "-y" || "$1" == "-yes" || "$1" == "-f" || "$1" == "-force" ]] ; then
|
2018-02-01 17:24:55 +01:00
|
|
|
ASK="NO"
|
|
|
|
shift
|
|
|
|
fi
|
2017-05-19 14:45:57 +02:00
|
|
|
|
2018-02-11 21:27:53 +01:00
|
|
|
if [[ "$1" == "-nc" ]] ; then
|
|
|
|
NCOLOR="YES"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
2018-02-01 17:24:55 +01:00
|
|
|
# predefined colors for echo -e on terminal
|
2018-02-11 23:35:42 +01:00
|
|
|
if [[ -t 1 && "${NCOLOR}" != "YES" ]] ; then
|
2018-02-01 17:24:55 +01:00
|
|
|
RED='\e[49;0;31;82m'
|
|
|
|
BLUE='\e[49;1;34;182m'
|
|
|
|
GREEN='\e[49;32;5;82m'
|
|
|
|
ORANGE='\e[49;0;33;82m'
|
|
|
|
PURPLE='\e[49;1;35;82m'
|
|
|
|
LGREY='\e[49;1;37;182m'
|
|
|
|
GREY='\e[1;30m'
|
|
|
|
CYAN='\e[36m'
|
|
|
|
NC='\e[0m'
|
|
|
|
fi
|
2017-05-19 14:45:57 +02:00
|
|
|
|
2018-02-12 12:32:04 +01:00
|
|
|
# Clear screen for better readability
|
|
|
|
[[ "${ASK}" == "YES" ]] && clear
|
|
|
|
|
2018-02-11 11:50:13 +01:00
|
|
|
# Get webmin/usermin dir based on script's location
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
PROD="webmin" # default
|
|
|
|
if [[ -r "${DIR}/usermin-init" && -r "${DIR}/uconfig.cgi" ]] ; then
|
|
|
|
echo -e "${ORANGE}Usermin detected ...${NC}"
|
2018-02-11 21:27:53 +01:00
|
|
|
PROD="usermin"
|
2018-02-11 11:50:13 +01:00
|
|
|
fi
|
|
|
|
# where to get source
|
|
|
|
HOST="https://github.com"
|
|
|
|
REPO="webmin/$PROD"
|
|
|
|
GIT="git"
|
|
|
|
|
|
|
|
# temporary locations for git clone
|
|
|
|
WTEMP="${DIR}/.~files/webadmin"
|
|
|
|
UTEMP="${DIR}/.~files/useradmin"
|
|
|
|
TEMP=$WTEMP
|
|
|
|
[[ "$PROD" == "usermin" ]] && TEMP=$UTEMP
|
|
|
|
LTEMP="${DIR}/.~lang"
|
|
|
|
|
|
|
|
|
2017-05-19 14:45:57 +02:00
|
|
|
# help requested output usage
|
|
|
|
if [[ "$1" == "-h" || "$1" == "--help" ]] ; then
|
2018-01-31 17:37:24 +01:00
|
|
|
echo -e "${NC}${ORANGE}This is the unofficial webmin update script${NC}"
|
2018-02-12 13:25:24 +01:00
|
|
|
echo "Usage: ${IAM} [-force] [-repo:username/xxxmin] [-release[:number]] [-file file ...]"
|
2018-02-02 00:10:31 +01:00
|
|
|
[[ "$1" == "--help" ]] && cat <<EOF
|
2018-01-31 17:37:24 +01:00
|
|
|
|
|
|
|
Parameters:
|
2018-02-02 00:10:31 +01:00
|
|
|
-force (-yes)
|
|
|
|
unattended install, do not ask
|
2018-02-11 21:27:53 +01:00
|
|
|
-nc or STDOUT is a pipe (|)
|
|
|
|
do not output colors
|
2018-02-02 00:10:31 +01:00
|
|
|
-repo
|
|
|
|
pull from alternative github repo, format: -repo:username/reponame
|
2018-02-12 13:25:24 +01:00
|
|
|
reponame must be "webmin" or "usermin"
|
2018-02-02 00:10:31 +01:00
|
|
|
default github repo: webmin/webmin
|
|
|
|
-release
|
2018-02-12 13:25:24 +01:00
|
|
|
pull a released version, default: -release:latest
|
2018-02-11 21:27:53 +01:00
|
|
|
-file
|
2018-02-11 23:35:42 +01:00
|
|
|
pull only the given file(s) or dir(s) from repo
|
2018-02-12 13:25:24 +01:00
|
|
|
Examples:
|
|
|
|
${IAM}
|
|
|
|
uodate everthing from default webmin repository
|
|
|
|
${IAM} -force or ${IAM} -yes
|
|
|
|
same but without asking,
|
|
|
|
${IAM} -fore -repo:qooob/webmin
|
|
|
|
updadte from qooobs repository without asking
|
|
|
|
${IAM} -file module/module.info
|
|
|
|
pull module.info for given module
|
|
|
|
${IAM} -file cpan
|
|
|
|
pull everything in cpan
|
|
|
|
${IAM} -file cpan/*
|
|
|
|
pull only existing files / dirs in cpan
|
|
|
|
${IAM} -file module/lang
|
|
|
|
pull all lang files of a module
|
|
|
|
${IAM} -fore -repo:qooob/webmin -file */lang
|
|
|
|
pull lang files for all existing */lang from qooobs
|
|
|
|
repository without asking
|
2018-01-31 17:37:24 +01:00
|
|
|
|
|
|
|
Exit codes:
|
2018-02-02 00:10:31 +01:00
|
|
|
0 - success
|
|
|
|
1 - abort on error or user request, nothing changed
|
|
|
|
2 - not run as root
|
|
|
|
3 - git not found
|
|
|
|
4 - stage 1: git clone failed
|
|
|
|
5 - stage 2: makedist failed
|
|
|
|
6 - stage 3: update with setup.sh failed, installation may in bad state!
|
2018-01-31 17:37:24 +01:00
|
|
|
|
|
|
|
EOF
|
2017-05-19 14:45:57 +02:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2018-02-11 11:45:13 +01:00
|
|
|
# check for required webmin / usermin files in current dir
|
|
|
|
if [[ ! -r "${DIR}/setup.sh" || ! -r "${DIR}/miniserv.pl" ]] ; then
|
2018-02-12 12:32:04 +01:00
|
|
|
echo -e "${NC}${RED}Error: the current dir does not contain a webmin installation, aborting ...${NC}"
|
2018-01-31 17:14:06 +01:00
|
|
|
exit 1
|
2017-12-21 20:45:58 +01:00
|
|
|
fi
|
|
|
|
|
2018-01-31 11:56:55 +01:00
|
|
|
# need to be root
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
2018-02-11 21:27:53 +01:00
|
|
|
echo -e "${RED}Error: This command has to be run under the root user.${NC}"
|
2018-01-31 17:14:06 +01:00
|
|
|
exit 2
|
2018-01-31 11:56:55 +01:00
|
|
|
fi
|
2017-05-19 14:45:57 +02:00
|
|
|
|
2018-02-12 12:32:04 +01:00
|
|
|
# search for config location
|
|
|
|
echo -en "${CYAN}Search for ${RPOD^} configuration ... ${NC}"
|
|
|
|
for conf in /etc/${PROD} /var/packages/${PROD}/target/etc
|
|
|
|
do
|
|
|
|
if [[ -r "${conf}/miniserv.conf" ]] ; then
|
|
|
|
MINICONF="${conf}/miniserv.conf"
|
|
|
|
echo -e "${ORANGE}found: ${MINICONF}${NC}"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# check for other locations if not in default
|
|
|
|
if [[ "${MINICONF}" == "" ]] ; then
|
2017-12-27 14:39:37 +00:00
|
|
|
MINICONF=`find /* -maxdepth 6 -name miniserv.conf 2>/dev/null | grep ${PROD} | head -n 1`
|
|
|
|
echo -e "${ORANGE}found: ${MINICONF}${NC} (alternative location)"
|
|
|
|
fi
|
|
|
|
|
2018-02-12 12:32:04 +01:00
|
|
|
# add PATH from config to system PATH
|
|
|
|
if [[ "${MINICONF}" != "" ]] ; then
|
|
|
|
export PATH="${PATH}:`grep path= ${MINICONF} | sed 's/^path=//'`"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# check if git is availible
|
2018-01-31 17:14:06 +01:00
|
|
|
if type ${GIT} >/dev/null 2>&1 ; then
|
|
|
|
true
|
|
|
|
else
|
|
|
|
echo -e "${RED}Error: Command \`git\` is not installed or not in the \`PATH\`.${NC}"
|
|
|
|
exit 3
|
|
|
|
fi
|
2018-01-31 11:56:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
################
|
|
|
|
# lets start
|
|
|
|
|
2017-05-19 14:45:57 +02:00
|
|
|
# alternative repo given
|
|
|
|
if [[ "$1" == *"-repo"* ]]; then
|
|
|
|
if [[ "$1" == *":"* ]] ; then
|
|
|
|
REPO=${1##*:}
|
2018-02-12 12:32:04 +01:00
|
|
|
[[ "${REPO##*/}" != "webmin" && "${REPO##*/}" != "usermin" ]] && echo -e "${RED}Error: ${REPO} is not a valid repo name!${NC}" && exit 1
|
2017-05-19 14:45:57 +02:00
|
|
|
shift
|
|
|
|
else
|
2018-02-12 12:32:04 +01:00
|
|
|
echo -e "${ORANGE}./`basename $0`:${NC} Missing argument for parameter -repo. aborting ..."
|
2018-01-31 17:14:06 +01:00
|
|
|
exit 1
|
2017-05-19 14:45:57 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# warn about possible side effects because webmins makedist.pl try cd to /usr/local/webmin (and more)
|
2018-02-12 12:32:04 +01:00
|
|
|
[[ -d "/usr/local/webadmin" ]] && echo -e "${ORANGE}Warning: Develop dir /usr/local/webadmin exist, update may fail!${NC}"
|
2017-05-19 14:45:57 +02:00
|
|
|
|
|
|
|
################
|
|
|
|
# really update?
|
|
|
|
REPLY="y"
|
2018-02-02 00:10:31 +01:00
|
|
|
|
|
|
|
if [ "${ASK}" == "YES" ] ; then
|
|
|
|
if [[ "$1" != "-release"* ]] ; then
|
|
|
|
echo -e "${RED}Warning:${NC} ${ORANGE}update from non release repository${NC} $HOST/$REPO ${ORANGE}may break your installation!${NC}"
|
|
|
|
fi
|
|
|
|
read -p "Would you like to update "${PROD^}" from ${HOST}/${REPO} [y/N] " -n 1 -r
|
|
|
|
echo
|
|
|
|
fi
|
2017-05-19 14:45:57 +02:00
|
|
|
|
|
|
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
|
|
# something different the y entered
|
|
|
|
echo -e "${PURPLE}Operation aborted.${NC}"
|
2018-01-31 17:14:06 +01:00
|
|
|
exit 1
|
2017-05-19 14:45:57 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
################
|
|
|
|
# here we go
|
2018-01-31 11:56:55 +01:00
|
|
|
|
|
|
|
# remove temporary files from failed run
|
|
|
|
rm -rf .~files
|
|
|
|
# pull source from github
|
|
|
|
if [[ "$1" == *"-release"* ]]; then
|
2017-05-19 14:45:57 +02:00
|
|
|
if [[ "$1" == *":"* ]] && [[ "$1" != *"latest"* ]]; then
|
|
|
|
RRELEASE=${1##*:}
|
|
|
|
else
|
2017-05-21 15:29:36 +02:00
|
|
|
RRELEASE=`curl -s -L https://github.com/${REPO}/blob/master/version | sed -n '/id="LC1"/s/.*">\([^<]*\).*/\1/p'`
|
2017-05-19 14:45:57 +02:00
|
|
|
fi
|
2018-02-11 21:27:53 +01:00
|
|
|
shift
|
2018-01-07 16:04:34 +00:00
|
|
|
echo -e "${CYAN}Pulling in latest release of${NC} ${ORANGE}${PROD^}${NC} $RRELEASE ($HOST/$REPO)..."
|
2017-12-21 20:45:58 +01:00
|
|
|
RS="$(${GIT} clone --depth 1 --branch $RRELEASE -q $HOST/$REPO.git "${TEMP}" 2>&1)"
|
2017-05-19 14:45:57 +02:00
|
|
|
if [[ "$RS" == *"ould not find remote branch"* ]]; then
|
|
|
|
ERROR="Release ${RRELEASE} doesn't exist. "
|
|
|
|
fi
|
2018-01-31 11:56:55 +01:00
|
|
|
else
|
2018-01-07 16:04:34 +00:00
|
|
|
echo -e "${CYAN}Pulling in latest changes for${NC} ${ORANGE}${PROD^}${NC} $RRELEASE ($HOST/$REPO) ..."
|
2017-12-21 20:45:58 +01:00
|
|
|
${GIT} clone --depth 1 --quiet $HOST/$REPO.git "${TEMP}"
|
2018-01-31 11:56:55 +01:00
|
|
|
fi
|
|
|
|
# on usermin!! pull also webmin to resolve symlinks later!
|
|
|
|
WEBMREPO=`echo ${REPO} | sed "s/\/usermin$/\/webmin/"`
|
|
|
|
if [[ "${REPO}" != "${WEBMREPO}" ]]; then
|
2018-01-07 16:04:34 +00:00
|
|
|
echo -e "${CYAN}Pulling in latest changes for${NC} ${ORANGE}Webmin${NC} ($HOST/$WEBMREPO) ..."
|
2017-12-21 20:45:58 +01:00
|
|
|
${GIT} clone --depth 1 --quiet $HOST/$WEBMREPO.git "${WTEMP}"
|
2018-01-31 11:56:55 +01:00
|
|
|
fi
|
2017-05-19 14:45:57 +02:00
|
|
|
|
2018-01-31 11:56:55 +01:00
|
|
|
# Check for possible errors
|
|
|
|
if [ $? -eq 0 ] && [ -f "${TEMP}/version" ]; then
|
2017-05-19 14:45:57 +02:00
|
|
|
|
2018-02-11 21:27:53 +01:00
|
|
|
####################
|
|
|
|
# start processing pulled source
|
|
|
|
version="`head -c -1 ${TEMP}/version`-`cd ${TEMP}; ${GIT} log -1 --format=%cd --date=format:'%m%d.%H%M'`"
|
|
|
|
DOTVER=`echo ${version} | sed 's/-/./'`
|
|
|
|
TARBALL="${TEMP}/tarballs/${PROD}-${DOTVER}"
|
|
|
|
###############
|
|
|
|
# start update
|
|
|
|
echo -en "${CYAN}Start update for${NC} ${PROD^} ..."
|
|
|
|
# create missing dirs, simulate authentic present
|
|
|
|
mkdir ${TEMP}/tarballs ${TEMP}/authentic-theme
|
|
|
|
cp authentic-theme/LICENSE ${TEMP}/authentic-theme
|
|
|
|
# put dummy clear and tar in PATH
|
|
|
|
echo -e "#!/bin/sh\necho" > ${TEMP}/clear; chmod +x ${TEMP}/clear
|
|
|
|
export PATH="${TEMP}:${PATH}"
|
|
|
|
# run makedist.pl
|
|
|
|
( cd ${TEMP}; perl makedist.pl ${DOTVER} ) | while read input; do echo -n "."; done
|
2018-02-11 23:46:27 +01:00
|
|
|
echo -e "\n"
|
2018-02-11 21:27:53 +01:00
|
|
|
if [[ ! -f "${TEMP}/tarballs/webmin-${DOTVER}.tar.gz" ]] ; then
|
|
|
|
echo -e "${RED}Error: makedist.pl failed! ${NC}aborting ..."
|
|
|
|
rm -rf .~files
|
|
|
|
exit 5
|
|
|
|
fi
|
2018-01-31 11:56:55 +01:00
|
|
|
|
2018-02-12 13:15:08 +01:00
|
|
|
# check for additional standard modules not in default dist
|
2018-02-11 21:27:53 +01:00
|
|
|
for module in `ls */module.info`
|
|
|
|
do
|
|
|
|
if [[ -f ${TEMP}/${module} && ! -f "${TARBALL}/$module" ]]; then
|
|
|
|
module=`dirname $module`
|
|
|
|
echo "${CYAN}Adding nonstandard${NC} ${ORANGE}$module${NC} to ${PROD^}" && cp -r -L ${TEMP}/${module} ${TARBALL}/
|
|
|
|
fi
|
|
|
|
done
|
2018-01-31 11:56:55 +01:00
|
|
|
|
2018-02-12 13:15:08 +01:00
|
|
|
# insert perl path
|
|
|
|
config_dir=`grep env_WEBMIN_CONFIG= ${MINICONF}| sed 's/.*_WEBMIN_CONFIG=//'`
|
|
|
|
perl=`cat $config_dir/perl-path`
|
|
|
|
echo -e "${CYAN}Insert perl path${NC} ${perl} ..."
|
|
|
|
( cd ${TARBALL}; sed -i --follow-symlinks "1 s|#\!/.*$|#!${perl}|" `find . -name '*.cgi' ; find . -name '*.pl'` )
|
|
|
|
|
|
|
|
####
|
|
|
|
# copy all or only given files ...
|
2018-02-11 21:27:53 +01:00
|
|
|
if [[ "$1" != "-file" ]] ; then
|
2018-01-31 15:41:46 +01:00
|
|
|
# prepeare unattended upgrade
|
|
|
|
echo "${version}" >"${TARBALL}/version"
|
|
|
|
cp "${TEMP}/chinese-to-utf8.pl" .
|
2018-01-31 11:56:55 +01:00
|
|
|
atboot="NO"
|
|
|
|
makeboot="NO"
|
|
|
|
nouninstall="YES"
|
2018-02-12 13:15:08 +01:00
|
|
|
[[ -x "${perl}" ]] && noperlpath="YES"
|
2018-01-31 11:56:55 +01:00
|
|
|
#nostart="YES"
|
2018-02-12 13:15:08 +01:00
|
|
|
export config_dir atboot nouninstall makeboot nostart noperlpath
|
2018-01-31 15:41:46 +01:00
|
|
|
( cd ${TARBALL}; ./setup.sh ${DIR} ) | grep -v -e "^$" -e "done$" -e "chmod" -e "chgrp" -e "chown"
|
2018-01-31 17:14:06 +01:00
|
|
|
if [[ "${TARBALL}/version" -nt "${MINICONF}" ]] ; then
|
2018-01-31 17:18:03 +01:00
|
|
|
echo -e "${RED}Error: update failed, ${PROD} may in a bad state! ${NC}aborting ..."
|
2018-01-31 17:14:06 +01:00
|
|
|
rm -rf .~files
|
|
|
|
exit 6
|
2018-02-02 00:10:31 +01:00
|
|
|
fi
|
2017-05-19 14:45:57 +02:00
|
|
|
|
2017-12-21 21:19:36 +01:00
|
|
|
#############
|
|
|
|
# postprocessing
|
2017-06-27 12:45:53 +02:00
|
|
|
|
2017-12-21 20:45:58 +01:00
|
|
|
# "compile" UTF-8 lang files
|
2018-02-11 21:27:53 +01:00
|
|
|
echo -en "\n${CYAN}Compile UTF-8 lang files${NC} ..."
|
2017-12-21 21:19:36 +01:00
|
|
|
if [[ `which iconv 2> /dev/null` != '' ]] ; then
|
2018-02-01 17:24:55 +01:00
|
|
|
perl "${TEMP}/chinese-to-utf8.pl" . 2>&1 | while read input; do echo -n "."; done
|
2017-12-21 20:45:58 +01:00
|
|
|
else
|
2017-12-21 21:19:36 +01:00
|
|
|
echo -e "${BLUE} iconv not found, skipping lang files!${NC}"
|
|
|
|
fi
|
2017-06-27 12:45:53 +02:00
|
|
|
|
2017-05-21 15:23:52 +02:00
|
|
|
# check if alternatve repo exist
|
|
|
|
AUTHREPO=`echo ${REPO} | sed "s/\/.*min$/\/autehtic-theme/"`
|
|
|
|
if [[ "${REPO}" != "${AUTHREPO}" ]]; then
|
2018-02-02 00:10:31 +01:00
|
|
|
exist=`curl -s -L ${HOST}/${AUTHREPO}`
|
|
|
|
[[ "${#exist}" -lt 20 ]] && RREPO="${AUTHREPO}"
|
|
|
|
fi
|
|
|
|
# run authenric-thme update, possible unattended
|
|
|
|
if [[ -x authentic-theme/theme-update.sh ]] ; then
|
|
|
|
if [[ "${ASK}" == "YES" ]] ; then
|
|
|
|
authentic-theme/theme-update.sh ${RREPO}
|
|
|
|
else
|
|
|
|
yes | authentic-theme/theme-update.sh ${RREPO}
|
|
|
|
fi
|
2017-05-21 15:23:52 +02:00
|
|
|
fi
|
2018-02-11 21:27:53 +01:00
|
|
|
else
|
|
|
|
# pull specifed files only
|
|
|
|
shift
|
|
|
|
FILES="$*"
|
|
|
|
for file in ${FILES}
|
|
|
|
do
|
2018-02-11 23:46:27 +01:00
|
|
|
if [[ -d "${TEMP}/tarballs/webmin-${DOTVER}/${file}" ]] ; then
|
|
|
|
echo -e "${BLUE}Copy dir ${ORANGE}${file}${NC} from ${ORANGE}${REPO}${NC} to ${PROD^} ..."
|
|
|
|
dest=${file%%/*}
|
|
|
|
[[ "${dest}" == "${file}" ]] && dest="."
|
|
|
|
cp -r -v "${TEMP}/tarballs/webmin-${DOTVER}/${file}" "${dest}" | sed 's/^.*\/tarballs\///'
|
|
|
|
else
|
|
|
|
echo -e "${CYAN}Copy file ${ORANGE}${file}${NC} from ${ORANGE}${REPO}${NC} to ${PROD^} ..."
|
|
|
|
mv "${file}" "${file}.bak"
|
|
|
|
cp "${TEMP}/tarballs/webmin-${DOTVER}/${file}" "${file}"
|
|
|
|
rm -rf "${file}.bak"
|
|
|
|
fi
|
2018-02-11 21:27:53 +01:00
|
|
|
done
|
|
|
|
fi
|
2018-01-31 11:56:55 +01:00
|
|
|
else
|
2017-05-19 14:45:57 +02:00
|
|
|
# something went wrong
|
2018-02-12 12:32:04 +01:00
|
|
|
echo -e "${RED}${ERROR} Error: updating files, failed.${NC}"
|
2018-02-02 00:10:31 +01:00
|
|
|
exit 4
|
2018-01-31 11:56:55 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
###########
|
|
|
|
# we are at the end, clean up
|
|
|
|
|
|
|
|
# remove temporary files
|
2018-02-11 21:27:53 +01:00
|
|
|
echo -e "\n${CYAN}Clean up temporary files ...${NC}"
|
|
|
|
rm -rf .~files
|
2018-01-31 11:56:55 +01:00
|
|
|
# fix permissions, should be done by makedist.pl?
|
2018-02-11 21:27:53 +01:00
|
|
|
echo -e "${CYAN}Make scripts executable ...${NC}"
|
2018-01-31 11:56:55 +01:00
|
|
|
chmod -R -x+X ${DIR}
|
|
|
|
chmod +x *.pl *.cgi *.pm *.sh */*.pl */*.cgi */*.pm */*.sh
|
2017-12-21 20:45:58 +01:00
|
|
|
|
2018-01-31 11:56:55 +01:00
|
|
|
# thats all folks
|
2018-02-11 21:32:17 +01:00
|
|
|
echo -e "\n${CYAN}Updating ${PROD^} ${ORANGE}${FILES}${NC} to Version `cat version`, done.${NC}"
|
2018-01-31 17:14:06 +01:00
|
|
|
|
|
|
|
# update success
|
|
|
|
exit 0
|