Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch between stable and nighly repository #54

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ sudo armbian-config
- **S07** - Manage SSH login options
- **S08** - Change shell system wide to BASH
- **S09** - Change shell system wide to ZSH
- **S10** - Switch to rolling release
- **S11** - Switch to stable release


- ## **Network**
Expand Down Expand Up @@ -96,6 +98,8 @@ Usage: armbian-configng [option] [arguments]
--cli S07 - Manage SSH login options
--cli S08 - Change shell system wide to BASH
--cli S09 - Change shell system wide to ZSH
--cli S10 - Switch to rolling release
--cli S11 - Switch to stable release
--cli N00 - Install Bluetooth support
--cli N01 - Remove Bluetooth support
--cli N02 - Bluetooth Discover
Expand Down
26 changes: 26 additions & 0 deletions lib/armbian-configng/config.ng.jobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,32 @@
"src_reference": "",
"author": "https://github.com/igorpecovnik",
"condition": "[[ $(cat /etc/passwd | grep \"^root:\" | rev | cut -d\":\" -f1 | cut -d\"/\" -f1| rev) == \"bash\" ]]"
},
{
"id": "S10",
"description": "Switch to rolling release",
"command": [
"get_user_continue \"This will switch to rolling releases\n\nwould you like to continue?\" process_input",
"set_rolling"
],
"status": "Active",
"doc_link": "",
"src_reference": "https://github.com/armbian/config/blob/master/debian-config-jobs#L1446",
"author": "Igor Pecovnik",
"condition": "grep -q 'apt.armbian.com' /etc/apt/sources.list.d/armbian.list"
},
{
"id": "S11",
"description": "Switch to stable release",
"command": [
"get_user_continue \"This will switch to stable releases\n\nwould you like to continue?\" process_input",
"set_stable"
],
"status": "Active",
"doc_link": "",
"src_reference": "https://github.com/armbian/config/blob/master/debian-config-jobs#L1446",
"author": "Igor Pecovnik",
"condition": "grep -q 'beta.armbian.com' /etc/apt/sources.list.d/armbian.list"
}

]
Expand Down
37 changes: 37 additions & 0 deletions lib/armbian-configng/config.ng.system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,40 @@ function qr_code (){
read -n 1 -s -r -p "Press any key to continue"

}


module_options+=(
["set_stable,author"]="Tearran"
["set_stable,ref_link"]="https://github.com/armbian/config/blob/master/debian-config-jobs#L1446"
["set_stable,feature"]="set_stable"
["set_stable,desc"]="Set Armbian to stable release"
["set_stable,example"]="set_stable"
["set_stable,status"]="Active"
)
#
# @description Set Armbian to stable release
#
function set_stable () {

if ! grep -q 'apt.armbian.com' /etc/apt/sources.list.d/armbian.list; then
sed -i "s/http:\/\/[^ ]*/http:\/\/apt.armbian.com/" /etc/apt/sources.list.d/armbian.list
fi
}

module_options+=(
["set_rolling,author"]="Tearran"
["set_rolling,ref_link"]="https://github.com/armbian/config/blob/master/debian-config-jobs#L1446"
["set_rolling,feature"]="set_rolling"
["set_rolling,desc"]="Set Armbian to rolling release"
["set_rolling,example"]="set_rolling"
["set_rolling,status"]="Active"
)
#
# @description Set Armbian to rolling release
#
function set_rolling () {

if ! grep -q 'beta.armbian.com' /etc/apt/sources.list.d/armbian.list; then
sed -i "s/http:\/\/[^ ]*/http:\/\/beta.armbian.com/" /etc/apt/sources.list.d/armbian.list
fi
}
Loading