Made sure, installation and uninstallation work seemlessly
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -37,3 +37,6 @@ hs_err_pid*
|
|||||||
.settings/
|
.settings/
|
||||||
.vscode/
|
.vscode/
|
||||||
.claude/
|
.claude/
|
||||||
|
cflash/*
|
||||||
|
pkg/*
|
||||||
|
|
||||||
|
|||||||
5
PKGBUILD
5
PKGBUILD
@@ -4,12 +4,13 @@ pkgver=1.0.1
|
|||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="A small and lightweight wrapper for dd that strips away the complexity of CLI flashing."
|
pkgdesc="A small and lightweight wrapper for dd that strips away the complexity of CLI flashing."
|
||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://github.com/cametendo/cflash-git"
|
url="https://gitea.cametendo.org/cametendo/cflash-emvs"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('java-runtime>=21')
|
depends=('java-runtime>=21')
|
||||||
makedepends=('java-environment>=21' 'maven' 'git')
|
makedepends=('java-environment>=21' 'maven' 'git')
|
||||||
source=("cflash::git+https://github.com/cametendo/cflash-git.git")
|
source=("cflash::git+https://gitea.cametendo.org/cametendo/cflash-emvs.git")
|
||||||
sha256sums=('SKIP')
|
sha256sums=('SKIP')
|
||||||
|
install=cflash.install
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$pkgname"
|
cd "$pkgname"
|
||||||
|
|||||||
BIN
cflash-1.0.1-1-any.pkg.tar.zst
Normal file
BIN
cflash-1.0.1-1-any.pkg.tar.zst
Normal file
Binary file not shown.
9
cflash.install
Normal file
9
cflash.install
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
pre_install() {
|
||||||
|
echo "Cleaning up legacy /usr/local files..."
|
||||||
|
rm -f /usr/local/bin/cflash
|
||||||
|
rm -rf /usr/local/lib/cflash
|
||||||
|
}
|
||||||
|
|
||||||
|
pre_upgrade() {
|
||||||
|
pre_install
|
||||||
|
}
|
||||||
@@ -9,7 +9,10 @@ fi
|
|||||||
|
|
||||||
# Create installation directories
|
# Create installation directories
|
||||||
mkdir -p /usr/local/lib/cflash
|
mkdir -p /usr/local/lib/cflash
|
||||||
cp cflash.jar /usr/local/lib/cflash/
|
echo "clean building cflash..."
|
||||||
|
mvn clean package
|
||||||
|
mv target/cflash-*-jar-with-dependencies.jar target/cflash.jar
|
||||||
|
cp target/cflash.jar /usr/local/lib/cflash/
|
||||||
cp cflash.sh /usr/local/bin/cflash
|
cp cflash.sh /usr/local/bin/cflash
|
||||||
chmod +x /usr/local/bin/cflash
|
chmod +x /usr/local/bin/cflash
|
||||||
|
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>org.cametendo</groupId>
|
<groupId>org.cametendo</groupId>
|
||||||
<artifactId>cflash</artifactId>
|
<artifactId>cflash</artifactId>
|
||||||
<version>1.0.1</version>
|
<version>1.0.2</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>21</maven.compiler.source>
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
|||||||
15
releases/cflash-1.0.0/release-notes.txt
Normal file
15
releases/cflash-1.0.0/release-notes.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
cflash is finally ready for distribution!! Here's what it can do:
|
||||||
|
|
||||||
|
TUI:
|
||||||
|
1. It will ask you to enter a device, f.e. sdd (no need for /dev/)
|
||||||
|
2. It will ask you to enter the FULL path of your ISO or image file (Tab-completion supported)
|
||||||
|
3. It will ask you to enter your preferred blocksize (Supported are: 512K (1), 1M (2), 2M (3), 4M (4), 8M (5) and 16M (6), can be entered as a digit
|
||||||
|
4. It will ask you to enter your preferred oflag (Supported are: direct (1), dsync (2), sync (3) and nocache (4), can also be entered as a digit)
|
||||||
|
5. Once completed, it will list your configuration for the flash (device, iso, blocksize and oflag) and ask, if that's all correct and you want to continue. If yes, it will continue and prompt you with a sudo (unless you started the program with sudo) and then start to flash.
|
||||||
|
6. After the flash is completed, you will get a message telling you it's done and to have fun with your new installation (depending on the OS).
|
||||||
|
|
||||||
|
CLI:
|
||||||
|
1. Enter all details for flashing (device (without /dev/), iso, blocksize and oflag), then press enter
|
||||||
|
2. You will be asked if the entered details are correct, confirm if they are all correct.
|
||||||
|
3. A sudo prompt (unless started with sudo) will appear, after confirming you have sudo-rights, the flash will start.
|
||||||
|
4. Once the flash is completed, you will get a message telling you it's done and to have fun with your new installation (depending on the OS).
|
||||||
4
releases/cflash-1.0.1/release-notes.txt
Normal file
4
releases/cflash-1.0.1/release-notes.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Changes made:
|
||||||
|
- Added path validation for "~".
|
||||||
|
- Added flashing available to nly non-mounted partitions
|
||||||
|
- now using 'lsblk -no' instead of normal 'lsblk'. for simplicity.
|
||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
@@ -99,7 +99,7 @@ public class StorageDeviceLister {
|
|||||||
System.out.println("Enter the name of your device (e.g., sdb or nvme1n1):");
|
System.out.println("Enter the name of your device (e.g., sdb or nvme1n1):");
|
||||||
|
|
||||||
} catch (IOException | InterruptedException e) {
|
} catch (IOException | InterruptedException e) {
|
||||||
System.out.println("Failed to run lsblk. Do you have it installed.");
|
System.out.println("Failed to run lsblk. Do you have it installed?");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ if [[ $EUID -ne 0 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Uninstalling cflash..."
|
||||||
rm -f /usr/local/bin/cflash
|
rm -f /usr/local/bin/cflash
|
||||||
rm -rf /usr/local/lib/cflash
|
rm -rf /usr/local/lib/cflash
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user