-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.sh
More file actions
executable file
·23 lines (19 loc) · 923 Bytes
/
config.sh
File metadata and controls
executable file
·23 lines (19 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
## CONFIG SCRIPT
# This script takes four command line arguments
# the first is the directory that we should be running this entire program in (/hdd for example)
# the second is the link to the kernel that we want to run the pop paths on
# the third is the kernel number to scrape CVEs for
# the fourth is the directory to store the patch files in
# rerun this script with new arguments to overwrite the current configuration
if [[ $# -eq 3 ]]; then
# Define the filename for the configuration file
CONFIG_FILE="vars.env"
# Write the environment variables to the configuration file
echo "export DIRECTORY=$1" >> $CONFIG_FILE
echo "export KERNEL_LINK=$2" >> $CONFIG_FILE
echo "export KERNEL_NUMBER=$3" >> $CONFIG_FILE
echo "Configuration file created successfully. Use 'source $CONFIG_FILE' to load the variables."
else
echo "Usage: ./config.sh <directory> <kernel_link> <kernel_number>"
fi