Attempting to update $id";
} else {
if (!mkdir("u/$id", 0777, true)) {
die("Failed to create u/$id directory.");
}
}
chdir("u/$id");
symlink ("../../index.html", "index.html");
symlink ("../../grep.php", "grep.php");
if (strpos($id, '_') !== false) {
echo "
Goto http://$HTTP_HOST/u/$id to grep!
";
} else {
echo "
Goto http://$id.$HTTP_HOST to grep!
";
}
symlink ("$id.txt", "tweets.txt");
echo `sed -e "s,TIMESTAMP,$(date)," ../../greptweet.appcache > greptweet.appcache`;
echo "
";
echo `../../fetch-tweets.sh $id & disown`;