Compare commits
10 Commits
e35d944d8e
...
46e2859d28
| Author | SHA1 | Date | |
|---|---|---|---|
| 46e2859d28 | |||
| 93a9424b98 | |||
| d4649c8f00 | |||
| 59ef68a9b4 | |||
| c6096a1d51 | |||
| 30b90ec02b | |||
| 137be4f34c | |||
| 8dc0e308ff | |||
| 8269d99d26 | |||
| bd281b11b6 |
@@ -22,7 +22,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone http://192.168.1.233:222/aggarwalakshun/rust-setup.git .
|
git clone https://akshun-gitlab.uk/aggarwalakshun/rust-setup.git .
|
||||||
git checkout $GITEA_SHA
|
git checkout $GITEA_SHA
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone http://192.168.1.233:222/aggarwalakshun/rust-setup.git .
|
git clone https://akshun-gitlab.uk/aggarwalakshun/rust-setup.git .
|
||||||
git checkout $GITEA_SHA
|
git checkout $GITEA_SHA
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -83,7 +83,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone http://192.168.1.233:222/aggarwalakshun/rust-setup.git .
|
git clone https://akshun-gitlab.uk/aggarwalakshun/rust-setup.git .
|
||||||
git checkout $GITEA_SHA
|
git checkout $GITEA_SHA
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
36
.gitlab-ci.yml
Normal file
36
.gitlab-ci.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: clone
|
||||||
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
|
|
||||||
|
.build_template: &build_template
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- cargo build --release
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- target/release/setup
|
||||||
|
|
||||||
|
build_on_arch:
|
||||||
|
<<: *build_template
|
||||||
|
image: archlinux:latest
|
||||||
|
before_script:
|
||||||
|
- pacman -Syu --noconfirm
|
||||||
|
- pacman -S --noconfirm git rustup gcc
|
||||||
|
- rustup default stable
|
||||||
|
|
||||||
|
build_on_debian:
|
||||||
|
<<: *build_template
|
||||||
|
image: debian:stable
|
||||||
|
before_script:
|
||||||
|
- apt update && apt upgrade -y
|
||||||
|
- apt install -y git cargo
|
||||||
|
|
||||||
|
build_on_fedora:
|
||||||
|
<<: *build_template
|
||||||
|
image: fedora:latest
|
||||||
|
before_script:
|
||||||
|
- dnf up -y
|
||||||
|
- dnf install -y git cargo
|
||||||
@@ -6,13 +6,10 @@ guake-git
|
|||||||
howdy-beta-git
|
howdy-beta-git
|
||||||
lens-bin
|
lens-bin
|
||||||
moonlight-qt-bin
|
moonlight-qt-bin
|
||||||
oh-my-posh-bin
|
|
||||||
onlyoffice-bin
|
onlyoffice-bin
|
||||||
jellyfin-media-player
|
jellyfin-media-player
|
||||||
mission-center
|
mission-center
|
||||||
moonlight-qt-bin
|
|
||||||
oh-my-posh-bin
|
oh-my-posh-bin
|
||||||
onlyoffice-bin
|
|
||||||
sunshine-bin
|
sunshine-bin
|
||||||
standardnotes-bin
|
standardnotes-bin
|
||||||
visual-studio-code-bin
|
visual-studio-code-bin
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
"org.qbittorrent.qBittorrent": "qBittorrent",
|
"org.qbittorrent.qBittorrent": "qBittorrent",
|
||||||
"org.videolan.VLC": "VLC",
|
"org.videolan.VLC": "VLC",
|
||||||
"org.standardnotes.standardnotes": "Standard Notes",
|
"org.standardnotes.standardnotes": "Standard Notes",
|
||||||
"one.ablaze.floorp": "Floorp"
|
"one.ablaze.floorp": "Floorp",
|
||||||
|
"app.zen_browser.zen": "Zen Browser",
|
||||||
|
"io.kinvolk.Headlamp": "Headlamp"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
guake
|
yakuake
|
||||||
neovim
|
neovim
|
||||||
git
|
git
|
||||||
flatpak
|
flatpak
|
||||||
@@ -9,3 +9,4 @@ kio-gdrive
|
|||||||
korganizer
|
korganizer
|
||||||
plasma5-integration
|
plasma5-integration
|
||||||
kwayland-integration
|
kwayland-integration
|
||||||
|
kdepim-addons
|
||||||
|
|||||||
20
src/main.rs
20
src/main.rs
@@ -29,7 +29,7 @@ fn main() -> io::Result<()> {
|
|||||||
let buffer = std::str::from_utf8(&file_content.data)
|
let buffer = std::str::from_utf8(&file_content.data)
|
||||||
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
|
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
|
||||||
|
|
||||||
let first_choice: Vec<String> = buffer.lines().map(|line| line.to_string()).collect();
|
let first_choice: Vec<String> = buffer.lines().map(|line| line.trim().to_string()).collect();
|
||||||
|
|
||||||
for (index, element) in first_choice.iter().enumerate() {
|
for (index, element) in first_choice.iter().enumerate() {
|
||||||
eprint!("{}. {}\n", index + 1, element);
|
eprint!("{}. {}\n", index + 1, element);
|
||||||
@@ -43,9 +43,9 @@ fn main() -> io::Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
match distro {
|
match distro {
|
||||||
"arch" => arch_choices(input)?, // Pass the input value here
|
"arch" => arch_choices(input)?,
|
||||||
"Debian" => debian_choices(input)?, // Pass the input value here
|
"Debian" => debian_choices(input)?,
|
||||||
"fedora" => fedora_choices(input)?, // Pass the input value here
|
"fedora" => fedora_choices(input)?,
|
||||||
_ => return Err(io::Error::new(io::ErrorKind::NotFound, "Unsupported distro")),
|
_ => return Err(io::Error::new(io::ErrorKind::NotFound, "Unsupported distro")),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@ fn install_programs() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
let file = Asset::get("prompts/programs.txt").ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "File not found"))?;
|
let file = Asset::get("prompts/programs.txt").ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "File not found"))?;
|
||||||
let buffer = std::str::from_utf8(&file.data)
|
let buffer = std::str::from_utf8(&file.data)
|
||||||
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
|
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
|
||||||
let choice: Vec<String> = buffer.lines().map(|line| line.to_string()).collect();
|
let choice: Vec<String> = buffer.lines().map(|line| line.trim().to_string()).collect();
|
||||||
|
|
||||||
for(index, element) in choice.iter().enumerate() {
|
for(index, element) in choice.iter().enumerate() {
|
||||||
eprint!("{}. {}\n", index+1, element)
|
eprint!("{}. {}\n", index+1, element)
|
||||||
@@ -235,6 +235,10 @@ fn update_system() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
_ => eprint!("Unsupported distro")
|
_ => eprint!("Unsupported distro")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if which("flatpak").is_some() {
|
||||||
|
Command::new("flatpak").arg("update").status()?;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,10 +249,10 @@ fn aur() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
let file = Asset::get("prompts/aur.txt").ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "File not found"))?;
|
let file = Asset::get("prompts/aur.txt").ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "File not found"))?;
|
||||||
let buffer = std::str::from_utf8(&file.data)
|
let buffer = std::str::from_utf8(&file.data)
|
||||||
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
|
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
|
||||||
let choice: Vec<String> = buffer.lines().map(|line| line.to_string()).collect();
|
let choice: Vec<String> = buffer.lines().map(|line| line.trim().to_string()).collect();
|
||||||
|
|
||||||
if which("yay").is_none() {
|
if which("yay").is_none() {
|
||||||
eprint!("AUR helper not found. Install yay Y/N? (1/0)");
|
eprint!("yay not found. Install yay Y/N? (1/0)");
|
||||||
let input = handle_int_input();
|
let input = handle_int_input();
|
||||||
if input == 1 {
|
if input == 1 {
|
||||||
Command::new("sudo").arg("pacman").arg("-S").arg("git").arg("base-devel").status()?;
|
Command::new("sudo").arg("pacman").arg("-S").arg("git").arg("base-devel").status()?;
|
||||||
@@ -291,7 +295,7 @@ fn third_party() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
let buffer = std::str::from_utf8(&file.data)
|
let buffer = std::str::from_utf8(&file.data)
|
||||||
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
|
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
|
||||||
|
|
||||||
let choices: Vec<String> = buffer.lines().map(|line| line.to_string()).collect();
|
let choices: Vec<String> = buffer.lines().map(|line| line.trim().to_string()).collect();
|
||||||
|
|
||||||
for (index, element) in choices.iter().enumerate() {
|
for (index, element) in choices.iter().enumerate() {
|
||||||
eprintln!("{}. {}", index + 1, element);
|
eprintln!("{}. {}", index + 1, element);
|
||||||
|
|||||||
Reference in New Issue
Block a user