upstream-extract script