diff options
author | frealgagu | 2018-04-08 22:10:50 -0500 |
---|---|---|
committer | frealgagu | 2018-04-08 22:10:50 -0500 |
commit | 6551e769fae8a533b5d167d8265a78b7f5f93811 (patch) | |
tree | 8d699b96f2301a923979ad519d2c6faecf1b51e2 /flutter.install | |
download | aur-6551e769fae8a533b5d167d8265a78b7f5f93811.tar.gz |
Initial commit
Diffstat (limited to 'flutter.install')
-rw-r--r-- | flutter.install | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/flutter.install b/flutter.install new file mode 100644 index 000000000000..38b040390344 --- /dev/null +++ b/flutter.install @@ -0,0 +1,28 @@ +post_install() { + 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)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)This folder has root permissions, so keep in mind to run flutter as root,$(tput sgr0)\n" + printf "$(tput setaf 4)otherwise you will not be able to modify anything in this directory.$(tput sgr0)\n" + printf "$(tput setaf 4)$(tput sgr0)\n" + printf "$(tput setaf 4)If you intend to use it as a regular user, create the Flutter users group:$(tput sgr0)\n" + printf "$(tput setaf 2)groupadd flutterusers$(tput sgr0)\n" + printf "$(tput setaf 4)Add your user into this group:$(tput sgr0)\n" + printf "$(tput setaf 2)gpasswd -a <user> flutterusers$(tput sgr0)\n" + printf "$(tput setaf 4)Change folder's group.$(tput sgr0)\n" + printf "$(tput setaf 2)chown -R :flutterusers /opt/flutter$(tput sgr0)\n" + printf "$(tput setaf 4)Change permissions of the folder so the user that was just added to the group will be able to write in it:$(tput sgr0)\n" + printf "$(tput setaf 2)chmod -R g+w /opt/flutter$(tput sgr0)\n" + printf "$(tput setaf 4)Re-login your terminal in to the newly created group:$(tput sgr0)\n" + printf "$(tput setaf 2)newgrp flutterusers$(tput sgr0)\n" +} + +post_upgrade() { + post_install +} + +post_remove() { + 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" +} |