From 73038f35d4aef579e619759eaf6091ffc29e29c2 Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 9 Feb 2007 19:43:55 +0000 Subject: templatepkg now splited between -a and -u options git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@168 04377dda-e619-0410-9926-eae83683ac58 --- src/jail-commit | 4 +- src/templatepkg | 207 +++++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 156 insertions(+), 55 deletions(-) (limited to 'src') diff --git a/src/jail-commit b/src/jail-commit index b48a0f9..1013c88 100755 --- a/src/jail-commit +++ b/src/jail-commit @@ -72,7 +72,7 @@ if [ -f $JAIL_LIST ]; then if [ "$?" == "0" ]; then echo updating $jailpath... if [ -d "$TEMPLATE_BASE.d" ] || [ -a "$TEMPLATE_BASE.template" ]; then - templatepkg -a $jail $jailpath + templatepkg -u $jail $jailpath template_merge $jailpath template_svn_commit $TEMPLATE_BASE fi @@ -85,7 +85,7 @@ search_template main --update if [ "$?" == "0" ]; then if [ -a "$TEMPLATE_BASE.template" ] || [ -a "$TEMPLATE_BASE.template" ]; then echo updating main installation... - templatepkg -a main + templatepkg -u main template_merge / template_svn_commit $TEMPLATE_BASE fi diff --git a/src/templatepkg b/src/templatepkg index 0029dcd..fb22e62 100755 --- a/src/templatepkg +++ b/src/templatepkg @@ -1,7 +1,6 @@ #!/bin/bash # -# templatepkg v0.2: create a simplepkg package list from -# a legacy slackware /var/log/packages +# templatepkg v0.3: template maintenance script from simplepkg suite # # feedback: rhatto at riseup.net | gpl # @@ -29,65 +28,167 @@ else exit 1 fi -APPEND="0" -if [[ ! -z "$3" && "$1" == "-a" ]]; then - ROOT="$3" - search_template $2 --new - APPEND="1" -elif [[ ! -z "$2" && "$1" == "-a" ]]; then - ROOT="/" - search_template $2 --new - APPEND="1" -elif [[ ! -z "$2" ]]; then - ROOT="$2" - search_template $1 --new -elif [[ ! -z "$1" ]]; then - search_template $1 --new - ROOT="/" -else - echo "usage: $BASENAME [-a]