Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Rémy Oudompheng
texlive-localmanager
Commits
aa6bbf83
Commit
aa6bbf83
authored
Aug 27, 2009
by
Francois Charette
Browse files
last fixes for version 0.3.0
parent
e29cefff
Changes
3
Hide whitespace changes
Inline
Side-by-side
PKGBUILD
View file @
aa6bbf83
...
...
@@ -9,7 +9,7 @@ url="http://wiki.archlinux.org/index.php?title=TeXLive#TeXLive_Local_Manager"
license
=(
'GPL'
)
depends
=(
'texlive-core>=2009'
'perl-libwww'
'perl-term-shellui'
'xz-utils'
)
source
=(
"http://dev.archlinux.org/~francois/
$pkgname
-
$pkgver
.tar.gz"
)
md5sums
=(
'
4bdec88a3fe344e9fc89373ccb31b0ec
'
)
md5sums
=(
'
50c59baca612d579ca5faa39749bb248
'
)
build
()
{
cd
$srcdir
/
$pkgname
...
...
maketarball
0 → 100755
View file @
aa6bbf83
#!/bin/bash
source
PKGBUILD
||
exit
1
cd
..
tar
czf
$pkgname
-
$pkgver
.tar.gz
$pkgname
/
{
tllocalmgr,tlpkg
}
mv
$pkgname
-
$pkgver
.tar.gz
$pkgname
/
tllocalmgr
View file @
aa6bbf83
...
...
@@ -24,7 +24,7 @@ use File::Path;
use
LWP::
Simple
;
#use YAML::Syck; ##for debugging
use
Term::
ANSIColor
qw(:constants)
;
$
Term::ANSIColor::
AUTORESET
=
1
;
#
$
Term::ANSIColor::
AUTORESET
=
1
;
use
Term::
ShellUI
;
die
"
You can't run this program as root
\n
"
if
$ENV
{'
USER
'}
eq
"
root
";
...
...
@@ -69,17 +69,28 @@ sub initlog {
$initlog
=
1
;
}
my
@dbstats
=
stat
(
$LOCALDB
);
# to know how old the local db is
my
@dbstats
;
my
$ageofdb
;
if
(
-
f
$LOCALDB
)
{
@dbstats
=
stat
(
$LOCALDB
);
# to know how old the local db is
}
else
{
$forceupdate
=
1
}
# only retrieve if local DB is older than 12 hours
unless
(
$skipupdate
)
{
my
$ageofdb
=
time
-
$dbstats
[
9
];
unless
(
$forceupdate
)
{
$ageofdb
=
time
-
$dbstats
[
9
]
;
}
if
(
$forceupdate
||
$ageofdb
>
3600
*
12
)
{
print
"
Retrieving new TeXLive database from CTAN...
\n
";
initlog
()
unless
$initlog
;
print
LOG
"
* Retrieving new TeXLive database from CTAN...
\n\t
$TLPDB
";
getstore
(
$TLPDB
,
$LOCALDBXZ
)
||
die
"
could not fetch
$TLPDB
: $!
";
system
("
mv
$ROOT
/tlpkg/texlive.tlpdb
$ROOT
/tlpkg/texlive.tlpdb.old
");
if
(
is_error
(
my
$rc
=
getstore
(
$TLPDB
,
$LOCALDBXZ
)
)
)
{
die
"
could not fetch
$TLPDB
:
$rc
";
};
system
("
test -f
$ROOT
/tlpkg/texlive.tlpdb && mv
$ROOT
/tlpkg/texlive.tlpdb
$ROOT
/tlpkg/texlive.tlpdb.old
");
system
("
unxz
$ROOT
/tlpkg/texlive.tlpdb.xz
");
}
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment