-
Notifications
You must be signed in to change notification settings - Fork 1
/
patch-kitchen.sh
39 lines (38 loc) · 1.19 KB
/
patch-kitchen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
#
# Patches the blocks world domains in the experiments
# so that they can be parsed by Fast Downward
# patch-blocks-world.sh
# Planning-PlanRecognition-Experiments
#
# Created by Felipe Meneguzzi on 2018-12-27.
# Copyright 2018 Felipe Meneguzzi. All rights reserved.
#
echo -n "Fixing domain.pddl in all experiments. Please wait. "
pushd kitchen
for o in 10 30 50 70 100; do
pushd $o
for FILE in *.tar.bz2; do
FOLDER=${FILE::-8}
# echo $FOLDER
mkdir $FOLDER
tar -jxf $FILE -C $FOLDER
pushd $FOLDER
# echo "Editing $FOLDER"
if [[ `uname` == "Darwin" ]]
then
sed -i .orig 's/water_jug keetle cloth tea_bag cup sugar bowl milk/water_jug keetle cloth tea_bag bowl milk/g' domain.pddl
sed -i .orig 's/bread toaster butter knife peanut_butter spoon/butter knife peanut_butter spoon/g' domain.pddl
rm domain.pddl.orig
elif [[ `uname` == "Linux" ]]
then
sed -i 's/water_jug keetle cloth tea_bag cup sugar bowl milk/water_jug keetle cloth tea_bag bowl milk/g' domain.pddl
sed -i 's/bread toaster butter knife peanut_butter spoon/butter knife peanut_butter spoon/g' domain.pddl
fi
tar -jcf ../$FILE .
popd
rm -rf $FOLDER
done
popd
done
echo "Done"