diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-13 02:31:32 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-13 02:31:32 +0100 |
commit | e7e8f7d29063df2017d419a898fe877b56b14653 (patch) | |
tree | b450d69a7775c0b898e15956fac7069975513aab /extract-files.sh | |
parent | 80d404b929c222f3fdc7ecad7694753c8c27a537 (diff) | |
parent | 25eedce86d2723b23b6fc21dece20540f7ec68c0 (diff) | |
download | device_samsung_i9300-e7e8f7d29063df2017d419a898fe877b56b14653.zip device_samsung_i9300-e7e8f7d29063df2017d419a898fe877b56b14653.tar.gz device_samsung_i9300-e7e8f7d29063df2017d419a898fe877b56b14653.tar.bz2 |
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_device_samsung_i9300 into replicant-6.0replicant-6.0-alpha-0006
Diffstat (limited to 'extract-files.sh')
-rwxr-xr-x | extract-files.sh | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/extract-files.sh b/extract-files.sh index 19dd948..c9d5f07 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2013 The CyanogenMod Project +# Copyright (C) 2016 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,16 +26,21 @@ adb wait-for-device echo "Pulling proprietary files..." for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do - DIR=`dirname $FILE` + DEST=$FILE + if echo $FILE | grep ':' 2>&1 >/dev/null; then + DEST=`echo $FILE | sed 's/.*://'` + FILE=`echo $FILE | sed 's/:.*//'` + fi + DIR=`dirname $DEST` if [ ! -d ../../../vendor/$VENDOR/$DEVICE/proprietary/$DIR ]; then mkdir -p ../../../vendor/$VENDOR/$DEVICE/proprietary/$DIR fi - adb pull /$FILE ../../../vendor/$VENDOR/$DEVICE/proprietary/$FILE + adb pull /$FILE ../../../vendor/$VENDOR/$DEVICE/proprietary/$DEST done (cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk -# Copyright (C) 2013 The CyanogenMod Project +# Copyright (C) 2016 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -61,11 +66,16 @@ for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do if [ $COUNT = "0" ]; then LINEEND="" fi - echo " \$(LOCAL_PATH)/proprietary/$FILE:$FILE$LINEEND" >> ../../../vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk + DEST=$FILE + if echo $FILE | grep ':' 2>&1 >/dev/null; then + DEST=`echo $FILE | sed 's/.*://'` + FILE=`echo $FILE | sed 's/:.*//'` + fi + echo " \$(LOCAL_PATH)/proprietary/$DEST:$FILE$LINEEND" >> ../../../vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk done (cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$DEVICE/$DEVICE-vendor.mk -# Copyright (C) 2013 The CyanogenMod Project +# Copyright (C) 2016 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -86,7 +96,7 @@ DEVICE_PACKAGE_OVERLAYS += vendor/__VENDOR__/__DEVICE__/overlay EOF (cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$DEVICE/BoardConfigVendor.mk -# Copyright (C) 2013 The CyanogenMod Project +# Copyright (C) 2016 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. |