Skip to content

Commit

Permalink
Refactor example hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexei Chekulaev committed Apr 19, 2017
1 parent 25db74a commit badd9f9
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 1 deletion.
15 changes: 14 additions & 1 deletion example/example.filelist
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
some-additional-files/somefile
# If you want to include more than a single script file
# You do it by creating addon.filelist file
# where all additional files should be described.
# One line per file, paths relative to current folder.

# Here is additional files
some-additional-files/somefile

# If you want to use hooks they should also be included here
# or they won't get downloaded and executed
example.pre-install
example.post-install
example.pre-uninstall
example.post-uninstall
4 changes: 4 additions & 0 deletions example/example.post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

echo "Post-install script to perform desired tasks after installation..."
sleep 1
4 changes: 4 additions & 0 deletions example/example.post-uninstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

echo "Post-uninstall script to perform a cleanup..."
sleep 2
8 changes: 8 additions & 0 deletions example/example.pre-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

echo "Pre-install script"
sleep 1
ehco "Check for dependencies or pre-requisites..."
sleep 2
echo "If exit code if non-zero the installation will not continue."
sleep 2
4 changes: 4 additions & 0 deletions example/example.pre-uninstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

echo "Pre-uninstall to ask for additional confirmation or warn about outcome..."
sleep 2
Empty file removed example/post-install
Empty file.
Empty file removed example/pre-install
Empty file.

0 comments on commit badd9f9

Please sign in to comment.