summarylogtreecommitdiffstats
path: root/flutter.install
blob: 87dedc666b11c19251483f88e2ad9a41e45174a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pre_upgrade() {
  echo "Cleaning up previous flutter installation."
  rm -rf "/opt/flutter"
}

post_upgrade() {
  NEW=$1
  OLD=$2

  if [[ "$OLD" == "3.7"* || "$OLD" == "3.6"* ]]; then
    if grep -q "flutterusers" /etc/group; then
      echo "Removing group flutterusers as no longer needed."
      groupdel "flutterusers"
    fi
  fi
}