[go: up one dir, main page]

Menu

[r2685]: / trunk / mozloll.sh  Maximize  Restore  History

Download this file

31 lines (21 with data), 761 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# This script requires the MOZILLA_BOOKMARKSFILE environment variable
# be set to the location where you export bookmarks from mozilla.
# Create an empty file with date and time _before_ bookmarks.html is
# exported by the iceweasel command below.
touch bookmarks.html_timestamp
if iceweasel ; then
if [ $MOZILLA_BOOKMARKSFILE -ot bookmarks.html_timestamp ] ; then
echo "You forgot to export the bookmarks file to $MOZILLA_BOOKMARKSFILE. Off with your head!"
exit_code=1
else
# apply_gpl_notice.sh does what it says.
cp $MOZILLA_BOOKMARKSFILE bookmarks.html && ./apply_gpl_notice.sh
exit_code=$?
fi
else
echo "iceweasel failed for some reason"
exit_code=2
fi
rm -f bookmarks.html_timestamp
exit $exit_code