Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed cp problem with non-existant target directories #24

Open
wants to merge 2 commits into
base: gingerbread
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion extract-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,17 @@ EOF
# $4 = directory name in $PROPRIETARY_COMMON_DIR
copy_file()
{
echo Pulling \"$1\"
if [[ -z "${ANDROIDFS_DIR}" ]]; then
echo Pulling \"$1\"
adb pull /$3/$1 $PROPRIETARY_COMMON_DIR/$4/$2
else
# Hint: Uncomment the next line to populate a fresh ANDROIDFS_DIR
# (TODO: Make this a command-line option or something.)
# adb pull /$3/$1 ${ANDROIDFS_DIR}/$3/$1
echo Copying \"$1\"
local TARGET=$PROPRIETARY_COMMON_DIR/$4/$2
local TARGET_DIR=$(dirname "$TARGET")
mkdir -p $TARGET_DIR
cp ${ANDROIDFS_DIR}/$3/$1 $PROPRIETARY_COMMON_DIR/$4/$2
fi

Expand Down