Add postinstall script to debian package for telemetry notification

This commit is contained in:
Dan Quirk 2016-04-02 02:07:16 +00:00 committed by Daniel Quirk
parent 49fae29b7b
commit 561f856e36
3 changed files with 16 additions and 0 deletions

3
packaging/debian/postinst Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo "This software may collect information about you and your use of the software, and send that to Microsoft."
echo "Please visit http://aka.ms/dotnet-cli-eula for more information."

View file

@ -158,6 +158,7 @@ create_empty_debian_layout(){
mkdir "$PACKAGE_LAYOUT_DIR/package_root"
mkdir "$PACKAGE_LAYOUT_DIR/samples"
mkdir "$PACKAGE_LAYOUT_DIR/docs"
mkdir "$PACKAGE_LAYOUT_DIR/DEBIAN"
}
copy_files_to_debian_layout(){
@ -175,6 +176,11 @@ copy_files_to_debian_layout(){
# Append Version to all manpage files
for manpage in "$PACKAGE_LAYOUT_DIR/docs/"*.1; do mv "$manpage" "${manpage%.1}"; done
for manpage in "$PACKAGE_LAYOUT_DIR/docs/"*; do mv "$manpage" "${manpage}-${DOTNET_CLI_VERSION}.1"; done
# Copy postinstall
cp "$PACKAGING_ROOT/postinst" "$PACKAGE_LAYOUT_DIR/$"
#cp "$PACKAGING_ROOT/postinst" "PACKAGE_LAYOUT_DIR/package_root"
#cp "$PACKAGING_ROOT/postinst" "$PACKAGE_LAYOUT_DIR/DEBIAN/postinst"
}
create_debian_package(){

View file

@ -152,6 +152,7 @@ package_all(){
package_absolute_placement
package_samples
package_docs
package_debian
}
generate_all(){
@ -216,6 +217,12 @@ package_docs(){
fi
}
package_debian(){
if [[ -d "$ABSOLUTE_PLACEMENT_DIR" ]]; then
cp "$ABSOLUTE_PLACEMENT_DIR/postinst" $DEBIAN_DIR/postinst
fi
}
## Generation Functions ##
generate_config_templates(){
python ${SCRIPT_DIR}/scripts/config_template_generator.py $CONFIG $SCRIPT_DIR/templates/debian $DEBIAN_DIR $PACKAGE_NAME $PACKAGE_VERSION