Update checkupdate

This commit is contained in:
abeudin 2014-03-13 11:17:01 +01:00
parent c84406583e
commit 4d7398622f

View file

@ -1,8 +1,13 @@
#!/bin/bash #!/bin/bash
if [ -f /tmp/changelog ]; if [ ! -d /tmp/yunohost ];
then then
rm /tmp/changelog mkdir /tmp/yunohost
fi
if [ -f /tmp/yunohost/changelog ];
then
rm /tmp/yunohost/changelog
fi fi
apt-get update -y > /dev/null 2>&1 apt-get update -y > /dev/null 2>&1
@ -10,7 +15,7 @@ if [[ $? != 0 ]];
then then
exit 2 exit 2
else else
echo OK > /tmp/update_status echo OK > /tmp/yunohost/update_status
fi fi
# Set $DIRCACHE # Set $DIRCACHE
@ -57,6 +62,6 @@ then
exit 3 exit 3
else else
if [ -x /usr/bin/apt-listchanges ] ; then if [ -x /usr/bin/apt-listchanges ] ; then
/usr/bin/apt-listchanges --which=both -f text $DEBS > /tmp/changelog 2>/dev/null /usr/bin/apt-listchanges --which=both -f text $DEBS > /tmp/yunohost/changelog 2>/dev/null
fi fi
fi fi