diff options
Diffstat (limited to 'flutter.install')
-rw-r--r-- | flutter.install | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/flutter.install b/flutter.install index 6f1a94301ad8..a96d2677cb50 100644 --- a/flutter.install +++ b/flutter.install @@ -1,27 +1,11 @@ +pre_upgrade() { + rm -rf "/opt/flutter/.git" +} + post_install() { - groupadd -f flutterusers - chgrp -R flutterusers /opt/flutter - chmod -R g+w /opt/flutter - printf "$(tput setaf 4)Flutter was installed on $(tput setaf 2)/opt/flutter$(tput sgr0)\n" - printf "$(tput setaf 4)$(tput sgr0)\n" - printf "$(tput setaf 4)If you intend to use it as a regular user, add your user into the group flutterusers:$(tput sgr0)\n" - printf "$(tput setaf 2)gpasswd -a <user> flutterusers$(tput sgr0)\n" - printf "$(tput setaf 4)$(tput sgr0)\n" - printf "$(tput setaf 4)You need to source $(tput setaf 2)/etc/profile$(tput setaf 4) or relogin to add flutter to your path.$(tput sgr0)\n" - printf "$(tput setaf 4)$(tput sgr0)\n" - printf "$(tput setaf 4)Re-login your terminal in to the group flutterusers:$(tput sgr0)\n" - printf "$(tput setaf 2)newgrp flutterusers$(tput sgr0)\n" - printf "$(tput setaf 4)$(tput sgr0)\n" - printf "$(tput setaf 4)To run flutter doctor correctly:$(tput sgr0)\n" - printf "$(tput setaf 2)git config --global --add safe.directory /opt/flutter$(tput sgr0)\n" + mv "/opt/flutter/.git-refs" "/opt/flutter/.git" } post_upgrade() { post_install } - -post_remove() { - groupdel flutterusers - printf "$(tput setaf 4)If you had added/modified files or permissions in folder /opt/flutter is possible you need to delete it manually.$(tput sgr0)\n" - printf "$(tput setaf 2)rm -rf /opt/flutter$(tput sgr0)\n" -} |