Add postinstall script to debian package for telemetry notification
This commit is contained in:
parent
49fae29b7b
commit
561f856e36
3 changed files with 16 additions and 0 deletions
3
packaging/debian/postinst
Executable file
3
packaging/debian/postinst
Executable 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."
|
|
@ -158,6 +158,7 @@ create_empty_debian_layout(){
|
||||||
mkdir "$PACKAGE_LAYOUT_DIR/package_root"
|
mkdir "$PACKAGE_LAYOUT_DIR/package_root"
|
||||||
mkdir "$PACKAGE_LAYOUT_DIR/samples"
|
mkdir "$PACKAGE_LAYOUT_DIR/samples"
|
||||||
mkdir "$PACKAGE_LAYOUT_DIR/docs"
|
mkdir "$PACKAGE_LAYOUT_DIR/docs"
|
||||||
|
mkdir "$PACKAGE_LAYOUT_DIR/DEBIAN"
|
||||||
}
|
}
|
||||||
|
|
||||||
copy_files_to_debian_layout(){
|
copy_files_to_debian_layout(){
|
||||||
|
@ -175,6 +176,11 @@ copy_files_to_debian_layout(){
|
||||||
# Append Version to all manpage files
|
# 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/"*.1; do mv "$manpage" "${manpage%.1}"; done
|
||||||
for manpage in "$PACKAGE_LAYOUT_DIR/docs/"*; do mv "$manpage" "${manpage}-${DOTNET_CLI_VERSION}.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(){
|
create_debian_package(){
|
||||||
|
|
|
@ -152,6 +152,7 @@ package_all(){
|
||||||
package_absolute_placement
|
package_absolute_placement
|
||||||
package_samples
|
package_samples
|
||||||
package_docs
|
package_docs
|
||||||
|
package_debian
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_all(){
|
generate_all(){
|
||||||
|
@ -216,6 +217,12 @@ package_docs(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package_debian(){
|
||||||
|
if [[ -d "$ABSOLUTE_PLACEMENT_DIR" ]]; then
|
||||||
|
cp "$ABSOLUTE_PLACEMENT_DIR/postinst" $DEBIAN_DIR/postinst
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
## Generation Functions ##
|
## Generation Functions ##
|
||||||
generate_config_templates(){
|
generate_config_templates(){
|
||||||
python ${SCRIPT_DIR}/scripts/config_template_generator.py $CONFIG $SCRIPT_DIR/templates/debian $DEBIAN_DIR $PACKAGE_NAME $PACKAGE_VERSION
|
python ${SCRIPT_DIR}/scripts/config_template_generator.py $CONFIG $SCRIPT_DIR/templates/debian $DEBIAN_DIR $PACKAGE_NAME $PACKAGE_VERSION
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue