Skip to content

Commit

Permalink
add git fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Oct 28, 2022
1 parent 6b9ed48 commit 40dd076
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/patch-realsense-ubuntu-lts-hwe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ then
kernel_git_tag=$(git ls-remote --tags origin | grep "${kernel_full_num}\." | grep '[^^{}]$' | head -n 1 | awk -F/ '{print $NF}')
fi
echo -e "\e[32mFetching Ubuntu LTS tag \e[47m${kernel_git_tag}\e[0m \e[32m to the local kernel sources folder\e[0m"
git fetch origin tag ${kernel_git_tag} --no-tags
git fetch origin tag ${kernel_git_tag} --no-tags --depth 1

# Verify that there are no trailing changes., warn the user to make corrective action if needed
if [ $(git status | grep 'modified:' | wc -l) -ne 0 ];
Expand Down Expand Up @@ -153,7 +153,7 @@ then


if [ $reset_driver -eq 1 ];
then
then
echo -e "\e[43mUser requested to rebuild and reinstall ubuntu-${ubuntu_codename} stock drivers\e[0m"
else
# Patching kernel for RealSense devices
Expand Down
4 changes: 2 additions & 2 deletions scripts/patch-realsense-ubuntu-lts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ then
kernel_full_num=$(echo $LINUX_BRANCH | cut -d '-' -f 1,2)
kernel_git_tag=$(git ls-remote --tags origin | grep "${kernel_full_num}\." | grep '[^^{}]$' | tail -n 1 | awk -F/ '{print $NF}')
echo -e "\e[32mFetching Ubuntu LTS tag \e[47m${kernel_git_tag}\e[0m \e[32m to the local kernel sources folder\e[0m"
git fetch origin tag ${kernel_git_tag} --no-tags
git fetch origin tag ${kernel_git_tag} --no-tags --depth 1

# Verify that there are no trailing changes., warn the user to make corrective action if needed
if [ $(git status | grep 'modified:' | wc -l) -ne 0 ];
Expand Down Expand Up @@ -144,7 +144,7 @@ then


if [ $reset_driver -eq 1 ];
then
then
echo -e "\e[43mUser requested to rebuild and reinstall ubuntu-${ubuntu_codename} stock drivers\e[0m"
else
# Patching kernel for RealSense devices
Expand Down

0 comments on commit 40dd076

Please sign in to comment.