local out="$1"
local files="$2"
- tar -cfO $files | bzip2 -z -c > "$out"
+ tar -cO $files | bzip2 -z -c > "$out"
}
save_file()
local save_out="$3"
cd "$save_path"
- archive "${base_path}/${save_out}.tar.bz2" $save_file > ${base_path}/${name}.log 2>&1
+ archive "${base_path}/${save_out}.tar.bz2" $save_path > ${base_path}/${name}.log 2>&1
files="$files ${save_out}.tar.bz2"
cd - > /dev/null
}
files="$files ${save_out_out}.log"
}
-bugtool_file()
+main_file()
{
local base="$1"
- cd "${base_path}"
- archive "${saved_tarball}" "$files ${name}.log"
+ cd "`dirname "${base_path}"`"
+ archive "${saved_tarball}" "`basename "${base_path}"`"
cd - > /dev/null
rm -rf "${base_path}"
}
save_out "xenops list" "xenops_list"
save_out "brctl show" "brctl_show"
save_out "ifconfig" "ifconfig"
-bugtool_file "/tmp/$name/$name-$d"
+main_file "/tmp/$name/$name-$d"
sync
echo "Writing tarball ${saved_tarball} successful."