Commit a8122f01 authored by Andrea Scarpino's avatar Andrea Scarpino

you can no more edit ChangeLog file name; made repoman.conf more clear

parent 82a1287d
# Repoman config file
# Repoman configuration file
#
# workspace: your working dir. For example:
WORKSPACE="/home/<user>/myrepository"
# url: your repository url. For example:
URL="http://www.myrepository.org/<ftp_dir>"
# repo: your repository name
REPO="myrepo"
# changelog: if you haven't one, set NOCHANGELOG=TRUE
CHANGELOG="ChangeLog"
# Your working dir
#WORKSPACE="/home/<user>/myrepository"
# Your repository URL
#URL="http://www.myrepository.org/<ftp_dir>"
# Your repository name
#REPO="myrepo"
# FTP Section
# username: ftp username
......@@ -22,17 +20,14 @@ FTP_DIR="/arch/x86_64"
# lftp commands or set them in ~/.lftp/rc
LFTP_CMDS="set ftp:ssl-protect-data true; set net:max-retries 3;"
# If you don't use a changelog file enable this
# Enable this if you do not use a changelog file
#NOCHANGELOG="true"
# More verbose, print commands output
#VERBOSE="true"
# Don't use any color for output
# Do not use any color for output
#NOCOLOR="true"
# Use default editor
#EDITOR="nano"
# To upload none file into your ftp enable this
#NOUPLOAD="true"
\ No newline at end of file
# Default editor
#EDITOR="nano"
\ No newline at end of file
......@@ -124,8 +124,8 @@ update(){
echo "* `date +\"%d-%m-%Y %R\"` `whoami` ${pkg} REMOVED" >> /tmp/${basename}/header
done
fi
cat /tmp/${basename}/header "${WORKSPACE}/${CHANGELOG}" > "/tmp/${basename}/${CHANGELOG}"
mv "/tmp/${basename}/${CHANGELOG}" "${WORKSPACE}/${CHANGELOG}"
cat /tmp/${basename}/header "${WORKSPACE}/ChangeLog" > "/tmp/${basename}/ChangeLog"
mv "/tmp/${basename}/ChangeLog" "${WORKSPACE}/ChangeLog"
fi
if [ "${ADD}" == "true" ]; then
......@@ -332,7 +332,7 @@ cleanup_ftp(){
upload(){
files="${REPO}.db.tar.gz"
[ ! ${NOCHANGELOG} ] && files="${files} ${CHANGELOG}"
[ ! ${NOCHANGELOG} ] && files="${files} ChangeLog"
if [ "${ADD}" == "true" ]; then
for pkg in ${built}; do
......@@ -357,11 +357,15 @@ get_pkgs_list(){
}
check_files(){
[ -z ${WORKSPACE} ] && print_error "Workspace dir is not set"
[ -z ${URL} ] && print_error "Repo URL is not set"
[ -z ${REPO} ] && print_error "Repo name is not set"
if [ ! -d "${WORKSPACE}/pkgs" ]; then
mkdir -p "${WORKSPACE}/pkgs" || print_error "cannot create ${WORKSPACE}/pkgs/"
fi
if [ "${NOCHANGELOG}" != "true" ]; then
touch "${WORKSPACE}/${CHANGELOG}" || print_error "cannot create ${CHANGELOG}"
touch "${WORKSPACE}/ChangeLog" || print_error "cannot create ChangeLog"
fi
}
......@@ -371,13 +375,13 @@ main(){
check_files
if [ "${NOCHANGELOG}" != "true" ]; then
printf "Downloading ${BOLD}${CHANGELOG}${DEFA}\n"
mv "${WORKSPACE}/${CHANGELOG}" "${WORKSPACE}/${CHANGELOG}.old" &>/dev/null
printf "Downloading ${BOLD}ChangeLog${DEFA}\n"
mv "${WORKSPACE}/ChangeLog" "${WORKSPACE}/ChangeLog.old" &>/dev/null
if [ "${VERBOSE}" == "true" ]; then
wget -P "${WORKSPACE}" "${URL}/${CHANGELOG}" || print_error "unable to get ${CHANGELOG}"
wget -P "${WORKSPACE}" "${URL}/ChangeLog" || print_error "unable to get ChangeLog"
printf "\n"
else
wget -P "${WORKSPACE}" "${URL}/${CHANGELOG}" &>/dev/null || print_error "unable to get ${CHANGELOG}"
wget -P "${WORKSPACE}" "${URL}/ChangeLog" &>/dev/null || print_error "unable to get ChangeLog"
fi
fi
printf "Downloading ${BOLD}${REPO}.db.tar.gz${DEFA}\n"
......@@ -414,7 +418,7 @@ main(){
if [ ${#built} -gt 0 -o "${REMOVE}" == "true" ]; then
printf "Updating "
[ "${NOCHANGELOG}" != "true" ] && printf "${BOLD}${CHANGELOG}${DEFA} and "
[ "${NOCHANGELOG}" != "true" ] && printf "${BOLD}ChangeLog${DEFA} and "
printf "${BOLD}${REPO}.db.tar.gz${DEFA}..."
update
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment