aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog22
-rw-r--r--Makefile2
-rwxr-xr-xcreate-file31
-rw-r--r--rpm-helper.spec5
4 files changed, 58 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e69de29..ce45937 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,22 @@
+2002-07-10 15:12 Frederic Lepied <flepied@mandrakesoft.com>
+
+ * rpm-helper.spec: 0.2-1mdk
+
+2002-07-10 15:10 Frederic Lepied <flepied@mandrakesoft.com>
+
+ * Makefile: added create-file
+
+2002-07-10 15:08 Frederic Lepied <flepied@mandrakesoft.com>
+
+ * create-file: first version
+
+2002-07-09 17:04 Frederic Lepied <flepied@mandrakesoft.com>
+
+ * AUTHORS, COPYING, Makefile, README, README.CVS, add-service,
+ add-user, del-service, del-user, rpm-helper.spec: Initial version
+
+2002-07-09 17:04 Frederic Lepied <flepied@mandrakesoft.com>
+
+ * AUTHORS, COPYING, Makefile, README, README.CVS, add-service,
+ add-user, del-service, del-user, rpm-helper.spec: Initial revision
+
diff --git a/Makefile b/Makefile
index 9d34753..e7b2712 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__')
FILES = AUTHORS README README.CVS COPYING ChangeLog Makefile \
$(PACKAGE).spec $(SCRIPTS)
-SCRIPTS = add-user del-user add-service del-service
+SCRIPTS = add-user del-user add-service del-service create-file
LIBDIR=/usr/share/rpm-helper
diff --git a/create-file b/create-file
new file mode 100755
index 0000000..6dce7c1
--- /dev/null
+++ b/create-file
@@ -0,0 +1,31 @@
+#!/bin/sh
+#---------------------------------------------------------------
+# Project : Mandrake Linux
+# Module : rpm-helper
+# File : create-file
+# Version : $Id$
+# Author : Frederic Lepied
+# Created On : Wed Jul 10 15:12:29 2002
+# Purpose : helper script for rpm scriptlets to create
+# a non existent file.
+#---------------------------------------------------------------
+
+if [ $# != 6 ]; then
+ echo "usage: $0 <pkg name> <num installed> <file> <owner> <group> <mode>" 1>&2
+ exit 1
+fi
+
+pkg=$1 # name of the package
+num=$2 # number of packages installed
+file=$3 # filename
+owner=$4 # owner of the file
+group=$5 # group of the file
+mode=$6 # mode of the file
+
+if [ ! -f $file ]; then
+ touch $file
+ chown $owner.$group $file
+ chmod $mode $file
+fi
+
+# create-file ends here
diff --git a/rpm-helper.spec b/rpm-helper.spec
index 7ae5214..4a98230 100644
--- a/rpm-helper.spec
+++ b/rpm-helper.spec
@@ -10,7 +10,7 @@
Summary: Helper scripts for rpm scriptlets
Name: rpm-helper
-Version: 0.1
+Version: 0.2
Release: 1mdk
Source0: %{name}-%{version}.tar.bz2
License: GPL
@@ -41,6 +41,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/%{name}
%changelog
+* Wed Jul 10 2002 Frederic Lepied <flepied@mandrakesoft.com> 0.2-1mdk
+- added create-file
+
* Tue Jul 9 2002 Frederic Lepied <flepied@mandrakesoft.com> 0.1-1mdk
- Initial version