summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2009-05-04 15:37:30 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2009-05-04 15:37:30 +0000
commit1f9ae3b62e4620ba48272be006fa4bf27f444c79 (patch)
tree2f55dfcb35952123be961daa81c527ac7d374fb2
parentddca6e5f83fe9cd430cf2c4bed7d41988a0f9630 (diff)
downloadnetsurf-1f9ae3b62e4620ba48272be006fa4bf27f444c79.tar.gz
netsurf-1f9ae3b62e4620ba48272be006fa4bf27f444c79.tar.bz2
Check if shared objects actually copied, and copy them on next startup if they didn't.
svn path=/trunk/netsurf/; revision=7390
-rwxr-xr-xamiga/dist/Install65
-rw-r--r--amiga/dist/Install.infobin8877 -> 8892 bytes
2 files changed, 65 insertions, 0 deletions
diff --git a/amiga/dist/Install b/amiga/dist/Install
index 88162cf18..5d0d64005 100755
--- a/amiga/dist/Install
+++ b/amiga/dist/Install
@@ -13,6 +13,56 @@
)
)
+(procedure p_failedsobjs
+ (message "The following shared objects failed to copy. These will be updated on next reboot.\n\n" #failedsobjs)
+)
+
+(procedure p_schedulesobj #sobj
+ (transcript "Scheduling update of " #sobj " for next reboot")
+
+ (set #failedsobjs (cat #failedsobjs "\n" #sobj))
+
+ (makedir "SObjs:so-installer")
+
+ (copyfiles
+ (source (tackon "SObjs" #sobj))
+ (dest "SObjs:so-installer")
+ )
+
+ (startup "Shared object installer"
+ (prompt "Adding commands to user-startup to schedule copy of " #sobj " on next reboot")
+ (help @startup-help)
+ (command "if EXISTS SObjs:so-installer\n")
+ (command " copy SObjs:so-installer SObjs: CLONE FORCE QUIET\n")
+ (command " delete SObjs:so-installer ALL FORCE QUIET\n")
+ (command "endif\n")
+ )
+)
+
+(procedure p_comparesobj #sobj
+ (set #same 0)
+ (set #sobj-version (getversion (tackon "SObjs/" #sobj)))
+ (if (= #sobj-version 0)
+ (
+ (if (exists (tackon "SObjs:" #sobj))
+ (
+ (set #file-newer (earlier (tackon "SObjs:" #sobj) (tackon "SObjs/" #sobj)))
+ (set #old-size (getsize (tackon "SObjs:" #sobj)))
+ (set #new-size (getsize (tackon "SObjs/" #sobj)))
+
+ (if (AND (= #old-size #new-size) (= #file-newer 0)) (set #same 1))
+ )
+ )
+ )
+ ; else if version info is available
+ (
+ (set #sobj-oldversion (getversion (tackon "SObjs:" #sobj)))
+
+ (if (= #sobj-version #sobj-oldversion) (set #same 1))
+ )
+ )
+)
+
(procedure p_copysobj #sobj
(set #sobj-version (getversion (tackon "SObjs/" #sobj)))
@@ -94,6 +144,13 @@
(run "CopyStore SObjs/" #sobj " SObjs:")
)
)
+
+ (p_comparesobj #sobj)
+ (if (= #same 0)
+ (
+ (p_schedulesobj #sobj)
+ )
+ )
)
)
)
@@ -115,6 +172,13 @@
(run "CopyStore SObjs/" #sobj " SObjs:")
)
)
+
+ (p_comparesobj #sobj)
+ (if (= #same 0)
+ (
+ (p_schedulesobj #sobj)
+ )
+ )
)
)
)
@@ -333,6 +397,7 @@
(exit (quiet))
)
(
+ (p_failedsobjs)
(exit)
)
)
diff --git a/amiga/dist/Install.info b/amiga/dist/Install.info
index a469e30ba..e4d297254 100644
--- a/amiga/dist/Install.info
+++ b/amiga/dist/Install.info
Binary files differ