Add a varition in common scripts to support sailfish blobs

Sailfish shares some makefiles with Marlin.
In particular BoardConfigVendor.mk and device-vendor-sailfish.mk
are inherited from device/google/marlin/marlin/BoardConfig.mk and
device/google/marlin/aosp_sailfish.mk respectively.

We need to support both devices within device/google/marlin.
Doing so is to avoid filenames collision when we uncompress the blobs.

BUG:29936685

Change-Id: I2e9ab34c6dde565ae2033885a7bd3444cee6a585
diff --git a/generate-packages.sh b/generate-packages.sh
index 6bb503f..cf025fe 100755
--- a/generate-packages.sh
+++ b/generate-packages.sh
@@ -130,6 +130,19 @@
   cp -R $COMPANY/staging/* tmp/vendor/$COMPANY/$DEVICE || echo \ \ \ \ Error copying makefiles
   echo \ \ Setting up shared makefiles
   cp -R root/* ${FILEDIR_ROOT} || echo \ \ \ \ Error copying makefiles
+
+  if [[ ${ROOTDEVICE} == sailfish ]]
+  then
+    FILEDIR_ROOT_SHARE=tmp/vendor/${MANUFACTURER}_devices/marlin
+    mkdir -p ${FILEDIR_ROOT_SHARE}
+
+    # sailfish shares BoardConfigVendor.mk with its bro' marlin
+    mv ${FILEDIR_ROOT}/BoardConfigVendor.mk ${FILEDIR_ROOT_SHARE}
+    # Move device-vendor-sailfish.mk under marlin directory so that it can be
+    # inherited by device/google/marlin/aosp_sailfish.mk
+    mv ${FILEDIR_ROOT}/device-vendor-sailfish.mk ${FILEDIR_ROOT_SHARE}
+  fi
+
   echo \ \ Generating self-extracting script
   SCRIPT=extract-$COMPANY-$DEVICE.sh
   cat PROLOGUE > tmp/$SCRIPT || echo \ \ \ \ Error generating script