Turn a ferium profile into a packwiz #167
JustSimplyKyle
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
for i in {0..84}
do
name=$(cat ~/.config/ferium/config.json | jq -r ".profiles" | jq -r ".[0]" | jq -r ".mods" | jq -r ".[$i]" | jq -r ".identifier"| jq -r ".[]")
if [[ $name =~ ^[0-9]+$ ]]
then
packwiz curseforge install --addon-id $name
else
packwiz modrinth install $name
fi
done pretty print version |
Beta Was this translation helpful? Give feedback.
0 replies
-
# get which profile you want
profile_count=$(cat ~/.config/ferium/config.json | jq ".profiles | length")
if [ $profile_count > 1 ];then
ferium profile list
echo "Please select which profile you want!"
read profile_selected
fi
# extract mods from ferium config
base_json="$(cat ~/.config/ferium/config.json | jq ".profiles | .[] | select(.name == \"$profile_selected\") | .mods")"
mod_count=$(echo "$base_json" | jq 'length')
for ((i=0;i<$mod_count;i++))
do
name=$(echo "$base_json" | jq -r ".[$i] | .identifier | .[]")
# if it's a curseforge mod, it will only contain numbers
if [[ $name =~ ^[0-9]+$ ]];then
yes N | packwiz curseforge install --addon-id $name
else
yes N | packwiz modrinth install $name
fi
done A fully updated version which takes accounts into everything!!(still excpet the versioning stuff) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
for i in {0..84}; do; name=$(cat ~/.config/ferium/config.json | jq -r ".profiles" | jq -r ".[0]" | jq -r ".mods" | jq -r ".[$i]" | jq -r ".identifier"| jq -r ".[]");if [[ $name =~ ^[0-9]+$ ]];then;packwiz curseforge install --addon-id $name;else;packwiz modrinth install $name;fi ; done
logic:
jq it the way into the first profile. if the mod id only contains numbers -> curseforge, else it's modrinth. This bash oneliner currently doesn't take into account dont-check-game-version and stuff, but it "works". The number 84 in the loop is the number of the mods you have
Beta Was this translation helpful? Give feedback.
All reactions