Project

General

Profile

« Previous | Next » 

Revision 101a3d62

Added by Renato Botelho almost 8 years ago

Simplify logic

View differences:

tools/templates/core_pkg/base/metadir/+INSTALL
10 10
fi
11 11

  
12 12
# Save a copy of /etc/version to trigger copynotice.inc show when it's needed
13
unset first_copynotice
14 13
if [ ! -f /cf/conf/copynotice_version ]; then
15
	first_copynotice=1
14
	# Create empty file to force it to differ and show notice once
15
	echo "" > /cf/conf/copynotice_version
16
else
17
	/bin/cp -f /etc/version /cf/conf/copynotice_version
16 18
fi
17
/bin/cp -f /etc/version /cf/conf/copynotice_version
18 19

  
19 20
echo %%PRODUCT_NAME%% > /etc/platform
20 21

  
......
38 39
	/usr/local/share/%%PRODUCT_NAME%%/base.txz
39 40

  
40 41
# Create/remove trigger to show copynotice when version changes
41
/usr/bin/cmp -s /etc/version /cf/conf/copynotice_version
42
if [ $? -ne 0 -o -n "${first_copynotice}" ]; then
43
	/usr/bin/touch /cf/conf/copynotice_display
44
else
42
if /usr/bin/cmp -s /etc/version /cf/conf/copynotice_version; then
45 43
	/bin/rm -f /cf/conf/copynotice_display >/dev/null 2>&1
44
else
45
	/usr/bin/touch /cf/conf/copynotice_display
46 46
fi
47 47

  
48 48
echo "===> Removing static obsoleted files"

Also available in: Unified diff