1 |
vip-ire |
1.1 |
diff -Nur e-smith-starterwebsite-2.6.0/createlinks e-smith-starterwebsite-2.6.0_bz9393/createlinks |
2 |
|
|
--- e-smith-starterwebsite-2.6.0/createlinks 2003-01-06 18:50:25.000000000 +0100 |
3 |
|
|
+++ e-smith-starterwebsite-2.6.0_bz9393/createlinks 2016-05-13 00:11:13.438100574 +0200 |
4 |
|
|
@@ -1,49 +1,7 @@ |
5 |
|
|
#!/usr/bin/perl -w |
6 |
|
|
|
7 |
|
|
+use esmith::Build::CreateLinks qw(:all); |
8 |
|
|
|
9 |
|
|
-sub safe_symlink { |
10 |
|
|
- my ($from, $to) = @_; |
11 |
|
|
- use File::Basename; |
12 |
|
|
- use File::Path; |
13 |
|
|
- mkpath(dirname($to)); |
14 |
|
|
- unlink($to); |
15 |
|
|
- symlink($from, $to) or die "Can't create symlink from $from to $to: $!"; |
16 |
|
|
-} |
17 |
|
|
|
18 |
|
|
-sub panel_link |
19 |
|
|
-{ |
20 |
|
|
- my ($function, $panel) = @_; |
21 |
|
|
- |
22 |
|
|
- my $cgibin = "root/etc/e-smith/web/panels/$panel/cgi-bin"; |
23 |
|
|
- |
24 |
|
|
- safe_symlink("../../../functions/$function", |
25 |
|
|
- "$cgibin/$function") |
26 |
|
|
-} |
27 |
|
|
- |
28 |
|
|
-#-------------------------------------------------- |
29 |
|
|
-# functions for manager panel |
30 |
|
|
-#-------------------------------------------------- |
31 |
|
|
-my $panel = "manager"; |
32 |
|
|
- |
33 |
|
|
-panel_link("starterwebsite", $panel); |
34 |
|
|
- |
35 |
|
|
-sub admin_common_link |
36 |
|
|
-{ |
37 |
|
|
- my ($function) = @_; |
38 |
|
|
- safe_symlink("../../../functions/$function", |
39 |
|
|
- "root/etc/e-smith/web/panels/manager/common/$function"); |
40 |
|
|
-} |
41 |
|
|
- |
42 |
|
|
-#-------------------------------------------------- |
43 |
|
|
-# Links for manager/common directory |
44 |
|
|
-#-------------------------------------------------- |
45 |
|
|
- |
46 |
|
|
- |
47 |
|
|
-sub event_link |
48 |
|
|
-{ |
49 |
|
|
- my ($action, $event, $level) = @_; |
50 |
|
|
- |
51 |
|
|
- safe_symlink("../actions/${action}", |
52 |
|
|
- "root/etc/e-smith/events/${event}/S${level}${action}"); |
53 |
|
|
-} |
54 |
|
|
+panel_link("starterwebsite", "manager"); |
55 |
|
|
|