mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-19 00:06:45 +00:00
Add verbose versions of apt
This commit is contained in:
19
images/linux/scripts/base/apt-mock.sh
Normal file
19
images/linux/scripts/base/apt-mock.sh
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh -x
|
||||||
|
|
||||||
|
prefix=/usr/local/bin
|
||||||
|
mkdir -p $prefix
|
||||||
|
|
||||||
|
for tool in apt apt-get apt-fast deb;do
|
||||||
|
real_tool=`which $tool`
|
||||||
|
cat >$prefix/$tool <<EOT
|
||||||
|
#!/bin/sh
|
||||||
|
$real_tool "\$@"
|
||||||
|
result=\$?
|
||||||
|
if [ \$result -ne 0 ];then
|
||||||
|
ps axjf
|
||||||
|
fi
|
||||||
|
EOT
|
||||||
|
chmod +x $prefix/$tool
|
||||||
|
ls -la $prefix/$tool
|
||||||
|
cat $prefix/$tool
|
||||||
|
done
|
||||||
@@ -74,6 +74,11 @@
|
|||||||
"script": "{{template_dir}}/scripts/base/apt.sh",
|
"script": "{{template_dir}}/scripts/base/apt.sh",
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"script": "{{template_dir}}/scripts/base/apt-mock.sh",
|
||||||
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"script": "{{template_dir}}/scripts/base/limits.sh",
|
"script": "{{template_dir}}/scripts/base/limits.sh",
|
||||||
|
|||||||
@@ -77,6 +77,11 @@
|
|||||||
"script": "{{template_dir}}/scripts/base/apt.sh",
|
"script": "{{template_dir}}/scripts/base/apt.sh",
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"script": "{{template_dir}}/scripts/base/apt-mock.sh",
|
||||||
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"script": "{{template_dir}}/scripts/base/limits.sh",
|
"script": "{{template_dir}}/scripts/base/limits.sh",
|
||||||
|
|||||||
@@ -79,6 +79,11 @@
|
|||||||
"script": "{{template_dir}}/scripts/base/apt.sh",
|
"script": "{{template_dir}}/scripts/base/apt.sh",
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"script": "{{template_dir}}/scripts/base/apt-mock.sh",
|
||||||
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"script": "{{template_dir}}/scripts/base/limits.sh",
|
"script": "{{template_dir}}/scripts/base/limits.sh",
|
||||||
|
|||||||
Reference in New Issue
Block a user