Skip to content

Instantly share code, notes, and snippets.

@Lacentix
Last active February 28, 2024 13:32
Show Gist options
  • Save Lacentix/b8d4cad389b0e0269cb4dd04d374755c to your computer and use it in GitHub Desktop.
Save Lacentix/b8d4cad389b0e0269cb4dd04d374755c to your computer and use it in GitHub Desktop.
Import or update Subtrees
#!/bin/bash
#
# This script imports/updates CLO sub-trees
#
read -p "Please input the tag/branch name: " branch
read -p "What do you want to do (import (i) or update (u)): " option
case $option in
import | i)
git subtree add --prefix=drivers/staging/qcacld-3.0 https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0.git/ $branch --squash
git subtree add --prefix=drivers/staging/qca-wifi-host-cmn https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn.git/ $branch
git subtree add --prefix=drivers/staging/fw-api https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api.git/ $branch
git subtree add --prefix=techpack/audio https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel.git/ $branch
git subtree add --prefix=techpack/camera https://git.codelinaro.org/clo/la/platform/vendor/opensource/camera-kernel.git $branch
git subtree add --prefix=techpack/data https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/data-kernel.git $branch
git subtree add --prefix=techpack/display https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers.git $branch
git subtree add --prefix=techpack/video https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver.git $branch
echo "Imported successfully."
;;
update | u)
git subtree pull --prefix=drivers/staging/qcacld-3.0 https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0.git/ $branch --squash
git subtree pull --prefix=drivers/staging/qca-wifi-host-cmn https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn.git/ $branch
git subtree pull --prefix=drivers/staging/fw-api https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api.git/ $branch
git subtree pull --prefix=techpack/audio https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel.git/ $branch
git subtree pull --prefix=techpack/camera https://git.codelinaro.org/clo/la/platform/vendor/opensource/camera-kernel.git $branch
git subtree pull --prefix=techpack/data https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/data-kernel.git $branch
git subtree pull --prefix=techpack/display https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers.git $branch
git subtree pull --prefix=techpack/video https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver.git $branch
echo "Updated successfully."
;;
*)
echo "Invalid option."
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment